forked from baron/baron-sso
테넌트 조회 경로와 테스트 기대값 정리
This commit is contained in:
@@ -65,8 +65,14 @@ describe("devApi", () => {
|
||||
expect(apiClient.get).toHaveBeenCalledWith("/dev/rp-usage/daily", {
|
||||
params: { days: 30, period: "week" },
|
||||
});
|
||||
expect(apiClient.get).toHaveBeenCalledWith("/tenants", {
|
||||
params: { limit: 25, offset: 50, parentId: "tenant-parent" },
|
||||
expect(apiClient.get).toHaveBeenCalledWith("/admin/tenants", {
|
||||
params: {
|
||||
limit: 25,
|
||||
offset: 50,
|
||||
parentId: "tenant-parent",
|
||||
cursor: undefined,
|
||||
search: undefined,
|
||||
},
|
||||
});
|
||||
expect(apiClient.get).toHaveBeenCalledWith("/dev/clients/client-a");
|
||||
expect(apiClient.get).toHaveBeenCalledWith(
|
||||
|
||||
@@ -283,9 +283,11 @@ export async function fetchTenants(
|
||||
limit = 1000,
|
||||
offset = 0,
|
||||
parentId?: string,
|
||||
cursor?: string,
|
||||
search?: string,
|
||||
) {
|
||||
const { data } = await apiClient.get<TenantListResponse>("/tenants", {
|
||||
params: { limit, offset, parentId },
|
||||
const { data } = await apiClient.get<TenantListResponse>("/admin/tenants", {
|
||||
params: { limit, offset, parentId, cursor, search },
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user