mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
fix: various issues
This commit is contained in:
parent
8c47e5ff4e
commit
838b2ee03a
5 changed files with 43 additions and 11 deletions
|
|
@ -7,7 +7,7 @@ function UserEditPassword() {
|
|||
const session = useSession() as any
|
||||
|
||||
const updatePasswordUI = async (values: any) => {
|
||||
let user_id = session.user.user_id
|
||||
let user_id = session.user.id
|
||||
await updatePassword(user_id, values)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ import { RequestBody, errorHandling } from '@services/utils/ts/requests'
|
|||
|
||||
export async function updatePassword(user_id: string, data: any) {
|
||||
const result: any = await fetch(
|
||||
`${getAPIUrl()}users/password/user_id/` + user_id,
|
||||
`${getAPIUrl()}users/change_password/` + user_id,
|
||||
RequestBody('PUT', data, null)
|
||||
)
|
||||
const res = await errorHandling(result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue