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