diff --git a/frontend/src/api/users.ts b/frontend/src/api/users.ts index 6fc67a80..5706c59e 100644 --- a/frontend/src/api/users.ts +++ b/frontend/src/api/users.ts @@ -220,7 +220,7 @@ export interface UserProfile { id: number email: string name: string - role: string + role: 'admin' | 'user' | 'passthrough' has_api_key: boolean api_key_masked: string } @@ -238,7 +238,7 @@ export interface RegenerateApiKeyResponse { * @returns Promise resolving to UserProfile */ export const getProfile = async (): Promise => { - const response = await client.get('/user/profile') + const response = await client.get('/user/profile') return response.data } @@ -248,7 +248,7 @@ export const getProfile = async (): Promise => { * @returns Promise resolving to success message */ export const updateProfile = async (data: { name: string; email: string; current_password?: string }): Promise<{ message: string }> => { - const response = await client.post('/user/profile', data) + const response = await client.post<{ message: string }>('/user/profile', data) return response.data }