Skip to content

Commit

Permalink
Merge pull request #423 from masterchief-Dave/feature/api-auth-magic-…
Browse files Browse the repository at this point in the history
…link

fix: validate magic link request body
  • Loading branch information
AdeGneus authored Aug 1, 2024
2 parents 3a99c79 + de6e1ec commit c066fe6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,10 @@ server.get("/api/v1/probe", (req: Request, res: Response) => {
res.send("I am the express api responding for team panther");
});
server.use("/run-tests", runTestRouter);
server.use("/api/v1/queues", ServerAdapter.getRouter());

server.use("/api/v1", authRoute);
server.use("/api/v1", userRouter);

server.use("/api/v1", authRoute);
server.use("/api/v1/queues", ServerAdapter.getRouter());
server.use("/api/v1", adminRouter);
server.use("/api/v1", sendEmailRoute);
server.use("/api/v1", helpRouter);
Expand Down
4 changes: 3 additions & 1 deletion src/utils/request-body-validator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { z } from "zod";

const emailSchema = z.string().email();
const emailSchema = z.object({
email: z.string().email(),
});

const createBlogSchema = z.object({
title: z.string(),
Expand Down

0 comments on commit c066fe6

Please sign in to comment.