add gitignore
This commit is contained in:
1 parent
e4e75632c5
commit
d8ed9abebf
49 files changed
+590
-9780
No files matched your search
Executable
+23
@@ -0,0 +1,23 @@
|
||||
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() {
|
||||
this.router.post("/send", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.sendInviteEmail);
|
||||
this.router.post("/verify", this.inviteController.verifyInviteToken);
|
||||
this.router.post("/", verifyJWT, isAllowed(["admin", "superadmin"]), this.inviteController.getInviteToken);
|
||||
}
|
||||
|
||||
getRouter() {
|
||||
return this.router;
|
||||
}
|
||||
}
|
||||
|
||||
export default InviteRoutes;
|
||||
Reference in new issue
Block a user