Skip to content

Commit b3348a2

Browse files
committed
fix(admin): theme loader hits versioned /api/v1/admin/theme
The earlier sed pass covered admin/src/{api.ts,App.tsx,pages/,components/,stores/} but missed admin/src/theme.ts. The pre-React theme bootstrap still called /api/admin/theme (unversioned) and 404'd on every page load — the SPA silently fell back to default theme so the bug was invisible. Same bug class as the logs-plugin mount-order fix in 167c45a; both fall out of the v0.7.0 versioning sprint.
1 parent 446b65c commit b3348a2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

admin/src/theme.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Theme override loader. Hits the public `/api/admin/theme` endpoint at
2+
* Theme override loader. Hits the public `/api/v1/admin/theme` endpoint at
33
* boot, then injects a `<style id="vb-theme">` block that overrides any
44
* supported CSS custom property at the `:root` level.
55
*
@@ -47,7 +47,7 @@ export function applyTheme(overrides: Record<string, string>): void {
4747

4848
export async function applyThemeOverrides(): Promise<void> {
4949
try {
50-
const res = await fetch("/api/admin/theme", { credentials: "same-origin" });
50+
const res = await fetch("/api/v1/admin/theme", { credentials: "same-origin" });
5151
if (!res.ok) return;
5252
const body = await res.json() as { data?: Record<string, string> };
5353
if (body.data) applyTheme(body.data);

0 commit comments

Comments
 (0)