mirror of
https://github.com/detleph/server.git
synced 2026-09-07 23:44:40 +02:00
Add router for the /admin endpoint
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
import express from "express";
|
||||||
|
import { getAllAdmins, createAdmin } from "../Controllers/admin.controller";
|
||||||
|
import { requireAuthentication } from "../Middleware/auth/auth";
|
||||||
|
|
||||||
|
const router = express.Router();
|
||||||
|
|
||||||
|
router.get("/", requireAuthentication, getAllAdmins);
|
||||||
|
|
||||||
|
router.post("/", requireAuthentication, createAdmin);
|
||||||
|
|
||||||
|
export default router;
|
||||||
Reference in New Issue
Block a user