mirror of
https://github.com/detleph/server.git
synced 2026-09-05 23:44:18 +02:00
Add routes for admin authentication endpoints
+ Add router to the app
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import express from "express";
|
||||
import prisma from "./lib/prisma";
|
||||
import eventRouter from "./Routes/event.routes";
|
||||
import adminAuthRouter from "./Routes/admin_auth.routes";
|
||||
|
||||
require("dotenv").config(); // Load dotenv config
|
||||
|
||||
@@ -13,6 +14,9 @@ async function main() {
|
||||
app.use(express.urlencoded({ extended: true }));
|
||||
app.use(express.json());
|
||||
|
||||
// Admin authentication endpoints
|
||||
app.use("/api/authentication", adminAuthRouter);
|
||||
|
||||
// All API endpoints are behind /api/...
|
||||
app.use("/api/events", eventRouter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user