feat: 前端支持平台子路径,托管时从平台登录进入
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { appUrl } from "./base";
|
||||
|
||||
export let installed: boolean | null = null;
|
||||
export let hosted = false;
|
||||
|
||||
export async function refreshInstalled() {
|
||||
const response = await fetch("/api/install/status");
|
||||
installed = Boolean((await response.json()).installed);
|
||||
const response = await fetch(appUrl("/api/install/status"), { cache: "no-store" });
|
||||
const status = (await response.json()) as { installed?: boolean; hosted?: boolean };
|
||||
installed = Boolean(status.installed);
|
||||
hosted = Boolean(status.hosted);
|
||||
return installed;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user