feat: add additional details change from user settings

This commit is contained in:
swve 2025-03-29 17:59:12 +01:00
parent dc5ac3039f
commit 5a2732258f
10 changed files with 667 additions and 281 deletions

View file

@ -2,14 +2,15 @@ import { getAPIUrl } from '@services/config/config'
import {
RequestBody,
RequestBodyFormWithAuthHeader,
RequestBodyWithAuthHeader,
errorHandling,
getResponseMetadata,
} from '@services/utils/ts/requests'
export async function getUser(user_id: string) {
export async function getUser(user_id: string, access_token: string) {
const result = await fetch(
`${getAPIUrl()}users/user_id/${user_id}`,
RequestBody('GET', null, null)
`${getAPIUrl()}users/id/${user_id}`,
RequestBodyWithAuthHeader('GET', null, null, access_token)
)
const res = await errorHandling(result)
return res