fix: updated /user/password route
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ import { extractErrorMessage } from '@/api/http'
|
|||||||
import type { ChangePasswordPayload } from '@/types/auth'
|
import type { ChangePasswordPayload } from '@/types/auth'
|
||||||
|
|
||||||
export async function changePasswordApi(payload: ChangePasswordPayload): Promise<void> {
|
export async function changePasswordApi(payload: ChangePasswordPayload): Promise<void> {
|
||||||
const response = await apiClient.post('/users/password', payload)
|
const response = await apiClient.post('/user/password', payload)
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
throw new Error(await extractErrorMessage(response, 'Failed to change password'))
|
throw new Error(await extractErrorMessage(response, 'Failed to change password'))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user