feat(schema): extend deployJobSchema to include 'redeploy' type and enhance auth settings for development environment

This commit is contained in:
Mauricio Siu
2026-01-12 08:57:45 -06:00
parent 6ca6ff3530
commit 6b9bcbc539
2 changed files with 7 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ export const deployJobSchema = z.discriminatedUnion("applicationType", [
titleLog: z.string().optional(),
descriptionLog: z.string().optional(),
server: z.boolean().optional(),
type: z.enum(["deploy"]),
type: z.enum(["deploy", "redeploy"]),
applicationType: z.literal("application-preview"),
serverId: z.string().min(1),
}),

View File

@@ -45,6 +45,12 @@ const { handler, api } = betterAuth({
return [
...(settings?.serverIp ? [`http://${settings?.serverIp}:3000`] : []),
...(settings?.host ? [`https://${settings?.host}`] : []),
...(process.env.NODE_ENV === "development"
? [
"http://localhost:3000",
"https://absolutely-handy-falcon.ngrok-free.app",
]
: []),
];
},
}),