fix(settings): use $updateProfileError and changePasswordFx per spec

This commit is contained in:
Kirill
2026-05-22 15:10:20 +05:00
parent e273c29c36
commit fa276eb7f3
3 changed files with 21 additions and 4 deletions
+4
View File
@@ -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