Add path to bookmarks, add logout button

This commit is contained in:
2025-10-10 00:12:14 +02:00
parent 06d04a1abc
commit 9a72c85019
18 changed files with 206 additions and 647 deletions

View File

@@ -132,6 +132,16 @@ export const put_user = async (data: Object) => {
}
}
export const logout_user = async (redirect_path: string) => {
check_response(await fetch(
get_endpoint() + "/user/session",
{ method: "DELETE" },
))
document.cookie = "pd_auth_key=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
window.location.pathname = redirect_path
}
export type VATRate = {
name: string,
vat: number,