2024-08-26 17:43:56 -07:00
|
|
|
const router = require("express").Router();
|
|
|
|
|
const { verifyJWT } = require("../middleware/verifyJWT");
|
2024-08-27 10:39:55 -07:00
|
|
|
const { isAllowed } = require("../middleware/isAllowed");
|
|
|
|
|
|
2024-08-26 17:43:56 -07:00
|
|
|
const {
|
2024-10-11 12:42:46 +08:00
|
|
|
issueInvitation,
|
2024-08-26 17:43:56 -07:00
|
|
|
inviteVerifyController,
|
|
|
|
|
} = require("../controllers/inviteController");
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
module.exports = router;
|