This commit is contained in:
2026-05-22 23:11:09 +03:00
parent aa25c6dec5
commit 96ea3788d5
9 changed files with 229 additions and 161 deletions

View File

@@ -90,6 +90,25 @@ export async function passwordResetStart(payload: PasswordResetStartPayload): Pr
}
}
export async function updatePhone(phone: string): Promise<void> {
const headers = await authedHeaders()
const res = await fetch(`${USERS_API_URL}/me/settings/phone`, {
method: 'PATCH',
credentials: 'include',
headers: {
'Content-Type': 'application/json',
...headers,
},
body: JSON.stringify({ phone }),
})
if (!res.ok) {
const data = await res.json().catch(() => ({}))
throw data
}
}
export interface PasswordResetCompletePayload {
email: string
code: string