integrated CoC pull from bookstack

This commit is contained in:
2025-12-12 00:39:19 -05:00
parent c74b5b280b
commit 333bf20d86
3 changed files with 77 additions and 18 deletions

View File

@@ -113,4 +113,20 @@ export async function restartApplication() {
if (!res.ok) {
console.error("Something went wrong restarting your application")
}
}
export async function getCoC(): Promise<string> {
const res = await fetch(`${addr}/application/coc`, {
method: "GET",
credentials: 'include',
});
if (res.ok) {
const out = res.json();
if (!out) {
return null;
}
return out;
} else {
return null;
}
}