пва
This commit is contained in:
@@ -101,6 +101,11 @@ export const changePasswordFx = createEffect(async (params: { oldPassword: strin
|
||||
await apiClient.post('me/change-password', params)
|
||||
})
|
||||
|
||||
export const requestEmailChangeFx = createEffect(async (email: string) => {
|
||||
const { data } = await apiClient.patch<{ verificationUrl: string }>('me/email', { email })
|
||||
return data.verificationUrl
|
||||
})
|
||||
|
||||
// ----- Error stores -----
|
||||
|
||||
export const $updateProfileError = createErrorStore(updateProfileFx).$error
|
||||
|
||||
Reference in New Issue
Block a user