Snai3i-LandingPage-FormBuilder / backend / src / routes / stormRoutes.ts
stormRoutes.ts
Raw
import { Router } from "express";
import { generateCode, verifyCode } from "../controllers/stormController";
import {
  Schemas,
  ValidateBodySchema,
} from "../middlewares/validateSchemaMiddleware";

const stormRouter = Router();

stormRouter
  .route("/generate")
  .post(ValidateBodySchema(Schemas.stormCode.generate), generateCode);

stormRouter
  .route("/verify")
  .post(ValidateBodySchema(Schemas.stormCode.verify), verifyCode);

export default stormRouter;