Implemented self extension

This commit is contained in:
2026-02-20 00:10:08 -05:00
parent 90db7de843
commit 86d069651c
3 changed files with 184 additions and 120 deletions

View File

@@ -169,6 +169,23 @@ export async function extendLOA(id: number, to: Date) {
}
});
if (res.ok) {
return
} else {
throw new Error("Could not extend LOA");
}
}
export async function adminExtendLOA(id: number, to: Date) {
const res = await fetch(`${addr}/loa/extendAdmin/${id}`, {
method: "POST",
credentials: 'include',
body: JSON.stringify({ to }),
headers: {
"Content-Type": "application/json",
}
});
if (res.ok) {
return
} else {