16 lines
607 B
JavaScript
16 lines
607 B
JavaScript
const express = require("express");
|
|
const router = express.Router();
|
|
|
|
const auth = require("../middleware/authAdmin");
|
|
|
|
const groupCtrl = require("../controllers/group");
|
|
|
|
router.post("/search", auth, groupCtrl.searchGroups);
|
|
router.post("/", auth, groupCtrl.create);
|
|
router.get("/stats", auth, groupCtrl.getStatsGroups);
|
|
router.put("/:id", auth, groupCtrl.modify);
|
|
router.delete("/:id", auth, groupCtrl.delete);
|
|
router.get("/get/:id", auth, groupCtrl.getOneById);
|
|
router.get("/preview/:id/:token", groupCtrl.showOneGroupById);// prévisualisation HTML, même si groupe "incomplet"
|
|
|
|
module.exports = router; |