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-11 12:42:46 +08:00
|
|
|
issueInvitation,
|
2024-08-26 17:43:56 -07:00
|
|
|
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-08-27 10:39:55 -07:00
|
|
|
router.post(
|
|
|
|
|
"/",
|
|
|
|
|
isAllowed(["admin", "superadmin"]),
|
|
|
|
|
verifyJWT,
|
2024-10-11 12:42:46 +08:00
|
|
|
issueInvitation
|
2024-08-27 10:39:55 -07:00
|
|
|
);
|
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;
|