replace inline objects with defined constants
This commit is contained in:
1 parent
a57da284d7
commit
34feb6d3fa
5 files changed
+195
-128
No files matched your search
@@ -50,3 +50,19 @@ export const editUserBodyValidation = z.object({
|
||||
email: lowercaseEmailValidation.optional(),
|
||||
profilePicture: z.string().optional(),
|
||||
});
|
||||
|
||||
// Canonical user shape returned by auth/user endpoints. Keep aligned with what
|
||||
// the controllers actually serialize (password is intentionally omitted).
|
||||
export const userResponseSchema = z
|
||||
.object({
|
||||
_id: z.string(),
|
||||
firstName: z.string(),
|
||||
lastName: z.string(),
|
||||
email: z.string(),
|
||||
role: z.array(z.string()),
|
||||
teamId: z.string().optional(),
|
||||
profileImage: z.string().nullable().optional(),
|
||||
createdAt: z.string(),
|
||||
updatedAt: z.string(),
|
||||
})
|
||||
.passthrough();
|
||||
Reference in new issue
Block a user