2024-10-15 11:57:37 +08:00
|
|
|
import { Router } from "express";
|
|
|
|
|
import { verifyJWT } from "../middleware/verifyJWT.js";
|
|
|
|
|
import { isAllowed } from "../middleware/isAllowed.js";
|
|
|
|
|
import {
|
2024-10-17 12:07:30 +08:00
|
|
|
issueInvitation,
|
|
|
|
|
inviteVerifyController,
|
2024-10-15 11:57:37 +08:00
|
|
|
} from "../controllers/inviteController.js";
|
|
|
|
|
|
|
|
|
|
const router = Router();
|
2024-08-26 17:43:56 -07:00
|
|
|
|
2024-10-17 12:07:30 +08:00
|
|
|
router.post("/", isAllowed(["admin", "superadmin"]), verifyJWT, issueInvitation);
|
2024-10-11 12:42:46 +08:00
|
|
|
router.post("/verify", issueInvitation);
|
2024-08-26 17:43:56 -07:00
|
|
|
|
2024-10-15 11:57:37 +08:00
|
|
|
export default router;
|