From 9b292bbd808f0d46a9ff793f42ccc2c3d0131bbd Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Tue, 17 Dec 2024 09:33:40 +0530 Subject: [PATCH] X-Client-Package determines this --- web/packages/accounts/services/user.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/web/packages/accounts/services/user.ts b/web/packages/accounts/services/user.ts index 986d0dd1d2..801362257e 100644 --- a/web/packages/accounts/services/user.ts +++ b/web/packages/accounts/services/user.ts @@ -71,11 +71,10 @@ export interface RecoveryKey { export const sendOTT = async (email: string, purpose: "change" | undefined) => ensureOk( await fetch(await apiURL("/users/ott"), { - headers: publicRequestHeaders(), method: "POST", + headers: publicRequestHeaders(), body: JSON.stringify({ email, - client: appName == "auth" ? "totp" : "web", purpose: purpose ?? "", }), }), @@ -191,14 +190,6 @@ export const changeEmail = async (email: string, ott: string) => { ); }; -export const sendOTTForEmailChange = async (email: string) => { - await HTTPService.post(await apiURL("/users/ott"), { - email, - client: "web", - purpose: "change", - }); -}; - export const setupTwoFactor = async () => { const resp = await HTTPService.post( await apiURL("/users/two-factor/setup"),