feat: complete SSR CRM and refine auth UI
Quality / quality (ubuntu-latest) (push) Failing after 11m17s
Quality / quality (windows-latest) (push) Canceled after 0s

This commit is contained in:
2026-08-20 16:17:59 +05:30
parent f57bd05a03
commit cd0dffa87d
49 changed files with 1640 additions and 139 deletions
+15 -1
View File
@@ -1482,13 +1482,27 @@ export function createHandlers(deps: RuntimeDeps): Handlers {
});
const apiCtx = createContext(apiReq, apiUrl);
apiCtx.locals = ctx.locals;
apiCtx.user = ctx.user;
apiCtx.tenant = ctx.tenant;
apiCtx.tracer = ctx.tracer;
apiCtx.ip = ctx.ip;
apiCtx.lang = ctx.lang;
apiCtx.t = ctx.t;
apiCtx.params = ctx.params;
apiCtx.cookies = ctx.cookies;
apiCtx.session = ctx.session;
apiCtx.localStorage = ctx.localStorage;
const apiRes = await handleApi(apiCtx);
if (!apiRes.ok) {
throw new Error(`API route ${apiUrl.pathname} returned ${apiRes.status}`);
const contentType = apiRes.headers.get("content-type") ?? "";
const data = contentType.includes("application/json")
? await apiRes.json().catch(() => undefined)
: await apiRes.text().catch(() => undefined);
throw Object.assign(new Error(`API route ${apiUrl.pathname} returned ${apiRes.status}`), {
status: apiRes.status,
data,
});
}
const contentType = apiRes.headers.get("content-type") ?? "";