integrated CoC pull from bookstack
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user