Allow for groups to be specified when POSTing /api/admins

+ Add the admin router to the global app
This commit is contained in:
Stephan
2022-04-28 12:49:07 +02:00
committed by Stefan-5422
parent c0878d5614
commit ed90f1e6ae
2 changed files with 28 additions and 4 deletions
+3
View File
@@ -3,6 +3,7 @@ import prisma from "./lib/prisma";
import eventRouter from "./Routes/event.routes";
import adminAuthRouter from "./Routes/admin_auth.routes";
import argon2 from "argon2";
import adminRouter from "./Routes/admin.routes";
require("dotenv").config(); // Load dotenv config
@@ -28,6 +29,8 @@ async function main() {
// All API endpoints are behind /api/...
app.use("/api/events", eventRouter);
app.use("/api/admins", adminRouter);
app.listen(process.env.PORT, () => {
console.log(`Listening on Port: ${process.env.PORT}`);
});