Add path to bookmarks, add logout button
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user