fix(settings): use $updateProfileError and changePasswordFx per spec
This commit is contained in:
@@ -100,6 +100,10 @@ export const unlinkOAuthFx = createEffect(async (provider: 'vk' | 'yandex') => {
|
||||
await apiClient.delete(`me/oauth/${provider}`)
|
||||
})
|
||||
|
||||
export const changePasswordFx = createEffect(async (params: { oldPassword: string; newPassword: string }) => {
|
||||
await apiClient.post('me/change-password', params)
|
||||
})
|
||||
|
||||
// ----- Error stores -----
|
||||
|
||||
export const $updateProfileError = createErrorStore(updateProfileFx).$error
|
||||
|
||||
Reference in New Issue
Block a user