fix: added missing files for change password

This commit is contained in:
2026-08-31 17:48:01 +02:00
parent f82dc34723
commit 4188f4afee
3 changed files with 263 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import { apiClient } from '@/api/client'
import { extractErrorMessage } from '@/api/http'
import type { ChangePasswordPayload } from '@/types/auth'
export async function changePasswordApi(payload: ChangePasswordPayload): Promise<void> {
const response = await apiClient.post('/users/password', payload)
if (!response.ok) {
throw new Error(await extractErrorMessage(response, 'Failed to change password'))
}
}