Files
Checkmate/server/routes/inviteRoute.js
T

23 lines
685 B
JavaScript
Raw Normal View History

2025-04-20 11:29:53 -07:00
import { Router } from "express";
import { verifyJWT } from "../middleware/verifyJWT.js";
import { isAllowed } from "../middleware/isAllowed.js";
class InviteRoutes {
constructor(inviteController) {
this.router = Router();
this.inviteController = inviteController;
this.initRoutes();
}
initRoutes() {
2025-07-23 14:58:44 -07:00
this.router.post("/send", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.sendInviteEmail);
this.router.post("/verify", this.inviteController.verifyInviteToken);
2025-07-21 10:34:16 -07:00
this.router.post("/", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.getInviteToken);
2025-04-20 11:29:53 -07:00
}
getRouter() {
return this.router;
}
}
export default InviteRoutes;