Skip to content

Commit

Permalink
fix(tutorService/create): add left out validation on create
Browse files Browse the repository at this point in the history
  • Loading branch information
Veirt committed Nov 15, 2024
1 parent bf9cda7 commit 76fefd7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/routes/v1/tutorService.route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,22 @@ import {
verifyTutor,
} from "@middleware/auth.middleware";
import { validator } from "@middleware/validation.middleware";
import { updateTutorServiceSchema } from "@schemas/tutorService.schema";
import {
createTutorServiceSchema,
updateTutorServiceSchema,
} from "@schemas/tutorService.schema";
import { Router } from "express";

// /api/v1/tutors/services
const tutorServiceRouter = Router();
tutorServiceRouter.use(firebaseAuthMiddleware);
tutorServiceRouter.use(verifyTutor);

tutorServiceRouter.post("/", tutorServiceController.createService);
tutorServiceRouter.post(
"/",
validator(createTutorServiceSchema),
tutorServiceController.createService,
);
tutorServiceRouter.patch(
"/:tutorServiceId",
validator(updateTutorServiceSchema),
Expand Down

0 comments on commit 76fefd7

Please sign in to comment.