mirror of
https://github.com/outline/outline.git
synced 2026-12-04 18:34:54 +03:00
chore: Upgrade Zod to version 4 (#11465)
This commit is contained in:
1 parent
c54194f97a
commit
c758f0d93a
61 files changed
+400
-373
No files matched your search
@@ -12,16 +12,16 @@ export const GitHubCallbackSchema = BaseSchema.extend({
|
||||
query: z
|
||||
.object({
|
||||
code: z.string().nullish(),
|
||||
state: z.string().uuid().nullish(),
|
||||
state: z.uuid().nullish(),
|
||||
error: z.string().nullish(),
|
||||
installation_id: z.coerce.number().optional(),
|
||||
setup_action: z.nativeEnum(SetupAction),
|
||||
setup_action: z.enum(SetupAction),
|
||||
})
|
||||
.refine((req) => !(isEmpty(req.code) && isEmpty(req.error)), {
|
||||
message: "one of code or error is required",
|
||||
error: "one of code or error is required",
|
||||
})
|
||||
.refine((req) => isEmpty(req.code) || isEmpty(req.error), {
|
||||
message: "code and error cannot both be present",
|
||||
error: "code and error cannot both be present",
|
||||
})
|
||||
.refine(
|
||||
(req) =>
|
||||
@@ -29,7 +29,9 @@ export const GitHubCallbackSchema = BaseSchema.extend({
|
||||
req.setup_action === SetupAction.install &&
|
||||
isUndefined(req.installation_id)
|
||||
),
|
||||
{ message: "installation_id is required for installation" }
|
||||
{
|
||||
error: "installation_id is required for installation",
|
||||
}
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user