Fix demo status API call using wrong base URL
getDemoStatus was using the /api/v1 axios client, so it called /api/v1/demo/status which 404s. The endpoint is at /demo/status with no prefix. Switch to plain axios so useDemoMode() returns true correctly and all demo guards (2FA, password, backups) actually work. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
3126b103b1
commit
0e3ae3b81a
1 changed files with 2 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import { api } from "./client";
|
import axios from "axios";
|
||||||
|
|
||||||
export async function getDemoStatus(): Promise<{ demo_mode: boolean }> {
|
export async function getDemoStatus(): Promise<{ demo_mode: boolean }> {
|
||||||
const r = await api.get<{ demo_mode: boolean }>("/demo/status");
|
const r = await axios.get<{ demo_mode: boolean }>("/demo/status");
|
||||||
return r.data;
|
return r.data;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue