diff --git a/website/src/lib/backend-calls.ts b/website/src/lib/backend-calls.ts index 2b19b46..d759fdf 100644 --- a/website/src/lib/backend-calls.ts +++ b/website/src/lib/backend-calls.ts @@ -13,6 +13,9 @@ async function accountApiFetch(url: string, method: "GET" | "POST" | "PUT" | "DE method, credentials: "include", ...body ? { + headers: { + "Content-Type": "application/json", + }, body: JSON.stringify(body), } : {}, }); @@ -28,6 +31,7 @@ export async function publishDictionary(): Promise } export async function upgradeAccount(password: string): Promise { + const response = await accountApiFetch("user/upgrade", "PUT", { password }); return response as AT.UpgradeUserResponse; } diff --git a/website/src/screens/Account.tsx b/website/src/screens/Account.tsx index 174f2ed..80b8dc8 100644 --- a/website/src/screens/Account.tsx +++ b/website/src/screens/Account.tsx @@ -124,7 +124,7 @@ const Account = ({ user, loadUser }: { user: AT.LingdocsUser | undefined, loadUs */}

Account Admin

- {user.level !== "basic" &&