forked from baron/baron-sso
chore: snapshot local state before dev merge
This commit is contained in:
@@ -163,6 +163,7 @@ export async function fetchAllTenants({
|
||||
export type OrgChartSnapshotResponse = {
|
||||
tenants: TenantSummary[];
|
||||
users: UserSummary[];
|
||||
generatedAt?: string;
|
||||
cache?: {
|
||||
source: "redis" | "database";
|
||||
hit: boolean;
|
||||
@@ -170,11 +171,15 @@ export type OrgChartSnapshotResponse = {
|
||||
};
|
||||
};
|
||||
|
||||
export async function fetchOrgChartSnapshot() {
|
||||
export async function fetchOrgChartSnapshot({
|
||||
refresh = false,
|
||||
}: {
|
||||
refresh?: boolean;
|
||||
} = {}) {
|
||||
const { data } = await apiClient.get<OrgChartSnapshotResponse>(
|
||||
"/v1/admin/orgchart/snapshot",
|
||||
{
|
||||
params: { cache: "redis" },
|
||||
params: { cache: "redis", ...(refresh ? { refresh: "true" } : {}) },
|
||||
},
|
||||
);
|
||||
return data;
|
||||
|
||||
Reference in New Issue
Block a user