mirror of
https://github.com/detleph/server.git
synced 2026-09-04 23:45:00 +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