Add display name to profile settings: User type, updateDisplayName API, ProfileSettings
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -58,3 +58,10 @@ export async function updateUserPreferences(preferences: UserPreferences): Promi
|
||||
body: JSON.stringify(preferences),
|
||||
})
|
||||
}
|
||||
|
||||
export async function updateDisplayName(displayName: string): Promise<void> {
|
||||
return apiRequest<void>('/auth/user/display-name', {
|
||||
method: 'PUT',
|
||||
body: JSON.stringify({ display_name: displayName }),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -10,9 +10,17 @@ import { getUserOrganizations, switchContext } from '@/lib/api/organization'
|
||||
interface User {
|
||||
id: string
|
||||
email: string
|
||||
display_name?: string
|
||||
totp_enabled: boolean
|
||||
org_id?: string
|
||||
role?: string
|
||||
preferences?: {
|
||||
email_notifications?: {
|
||||
new_file_received: boolean
|
||||
file_downloaded: boolean
|
||||
security_alerts: boolean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface AuthContextType {
|
||||
|
||||
Reference in New Issue
Block a user