Skip to content

Commit

Permalink
refactor: ♻️ revert roles key being optional
Browse files Browse the repository at this point in the history
  • Loading branch information
slugb0t committed Dec 10, 2024
1 parent 8edc800 commit a878891
Showing 1 changed file with 14 additions and 21 deletions.
35 changes: 14 additions & 21 deletions ui/server/api/[owner]/[repo]/code-metadata/index.put.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,13 @@ export default defineEventHandler(async (event) => {
email: z.string().optional(),
familyName: z.string().optional(),
givenName: z.string(),
roles: z
.array(
z.object({
endDate: z.number().optional().nullable(),
role: z.string().nullable(),
startDate: z.number().optional().nullable(),
}),
)
.optional(),
roles: z.array(
z.object({
endDate: z.number().optional().nullable(),
role: z.string().nullable(),
startDate: z.number().optional().nullable(),
}),
),
uri: z.string().optional(),
}),
),
Expand All @@ -33,18 +31,13 @@ export default defineEventHandler(async (event) => {
email: z.string().optional(),
familyName: z.string().optional(),
givenName: z.string(),
roles: z
.array(
z.object({
endDate: z
.union([z.string(), z.number()])
.optional()
.nullable(),
role: z.string().nullable(),
startDate: z.number().optional().nullable(),
}),
)
.optional(),
roles: z.array(
z.object({
endDate: z.union([z.string(), z.number()]).optional().nullable(),
role: z.string().nullable(),
startDate: z.number().optional().nullable(),
}),
),
uri: z.string().optional(),
}),
),
Expand Down

0 comments on commit a878891

Please sign in to comment.