diff --git a/client-di2/src/components/app-sidebar.tsx b/client-di2/src/components/app-sidebar.tsx index 4d9c643..4f26b8b 100644 --- a/client-di2/src/components/app-sidebar.tsx +++ b/client-di2/src/components/app-sidebar.tsx @@ -50,7 +50,7 @@ export function AppSidebar() { - prefetch(["/api/dashboard"])}> + prefetch(["/api/di2/dashboard"])}> Дашборд diff --git a/client-di2/src/pages/dashboard.tsx b/client-di2/src/pages/dashboard.tsx index c82de34..a9cb7ef 100644 --- a/client-di2/src/pages/dashboard.tsx +++ b/client-di2/src/pages/dashboard.tsx @@ -130,7 +130,7 @@ export default function Dashboard() { const qs = queryParams.toString(); const { data, isLoading, error } = useQuery({ - queryKey: ["/api/dashboard", qs], + queryKey: ["/api/di2/dashboard", qs], queryFn: async () => { const resp = await fetch(`/api/dashboard${qs ? `?${qs}` : ""}`); if (!resp.ok) throw new Error("fetch error"); diff --git a/server/finance-di2/index.ts b/server/finance-di2/index.ts index 699e15c..17e9fb3 100644 --- a/server/finance-di2/index.ts +++ b/server/finance-di2/index.ts @@ -12,7 +12,7 @@ const DI2_PREFIXES = [ "/api/expenses", "/api/expense-categories", "/api/debt", - "/api/dashboard", + "/api/di2", "/api/profitability", "/api/heatmap", "/api/planning", diff --git a/server/finance-di2/routes.ts b/server/finance-di2/routes.ts index f5fb00a..e749ecf 100644 --- a/server/finance-di2/routes.ts +++ b/server/finance-di2/routes.ts @@ -1498,7 +1498,7 @@ export async function registerRoutes(httpServer: Server, app: Express): Promise< return [`(${parts.join(" OR ")})`]; } - app.get("/api/dashboard", async (req, res) => { + app.get("/api/di2/dashboard", async (req, res) => { try { const cacheKey = stableKey("dashboard", req.query as Record); const result = await cachedQuery(cacheKey, TTL_LONG, async () => {