Skip to content

Commit

Permalink
createdAt date
Browse files Browse the repository at this point in the history
  • Loading branch information
jsbroks committed Oct 4, 2024
1 parent 8b63e32 commit 6f4bd5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion apps/webservice/src/app/api/v1/releases/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ import { Permission } from "@ctrlplane/validators/auth";
import { getUser } from "~/app/api/v1/auth";

const bodySchema = createRelease.and(
z.object({ metadata: z.record(z.string()).optional() }),
z.object({
metadata: z.record(z.string()).optional(),
createdAt: z.string().transform((s) => new Date(s)),
}),
);

export const POST = async (req: NextRequest) => {
Expand Down

0 comments on commit 6f4bd5e

Please sign in to comment.