1
0
forked from baron/baron-sso

chore: snapshot local state before dev merge

This commit is contained in:
2026-06-17 21:25:42 +09:00
parent b2808759d2
commit 49560e8a8c
107 changed files with 8958 additions and 939 deletions

View File

@@ -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;