mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-12-05 23:54:25 +00:00
fix(webui): correct settings role check and tighten DTO role types
This commit is contained in:
@@ -33,7 +33,7 @@ export const getMeResponseSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
email: z.string().optional(),
|
||||
role: z.string(),
|
||||
role: z.enum(['owner', 'editor', 'reviewer', 'bot', 'unknown']),
|
||||
image: z.string().optional(),
|
||||
unreadNotificationCount: z.number().optional(),
|
||||
})
|
||||
@@ -48,7 +48,7 @@ export type UpdateMeRequest = z.infer<typeof updateMeRequestSchema>
|
||||
export const userInfoSchema = z.object({
|
||||
id: z.string(),
|
||||
name: z.string(),
|
||||
role: z.string(),
|
||||
role: z.enum(['owner', 'editor', 'reviewer', 'bot', 'unknown']),
|
||||
email: z.string().optional(),
|
||||
type: z.enum(['human', 'agent']).optional(),
|
||||
image: z.string().optional(),
|
||||
|
||||
Reference in New Issue
Block a user