This commit is contained in:
2026-09-19 16:59:15 +03:30
parent 663d0a36aa
commit 0d113611cb
198 changed files with 2491 additions and 944 deletions
+3 -2
View File
@@ -136,7 +136,7 @@ export async function fetchMe(): Promise<User | null> {
}
export async function updateProfile(
data: Partial<Pick<User, 'firstName' | 'lastName' | 'nationalId' | 'avatarUrl'>>,
data: Partial<Pick<User, 'firstName' | 'lastName' | 'nationalId' | 'avatarUrl' | 'address'>>,
): Promise<User | null> {
try {
const updated = await apiRequest<User>('/auth/profile', {
@@ -150,7 +150,8 @@ export async function updateProfile(
data.avatarUrl !== undefined &&
data.firstName === undefined &&
data.lastName === undefined &&
data.nationalId === undefined
data.nationalId === undefined &&
data.address === undefined
const current = getCachedUser()
if (!avatarOnly || !current) throw e
const merged: User = { ...current }