F
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user