Update auth endpoints

This commit is contained in:
Alex Holliday committed 2024-09-24 13:56:58 +08:00
1 parent 4b35811897
commit d2ab33492a
3 files changed
+104 -81

No files matched your search

+11 -1
View File
@@ -1,3 +1,7 @@
const path = require("path");
const fs = require("fs");
const swaggerUi = require("swagger-ui-express");
const express = require("express");
const helmet = require("helmet");
const cors = require("cors");
@@ -21,8 +25,11 @@ const NetworkService = require("./service/networkService");
const EmailService = require("./service/emailService");
const PageSpeedService = require("./service/pageSpeedService");
const SERVICE_NAME = "Server";
let cleaningUp = false;
let cleaningUp = false;
const openApiSpec = JSON.parse(
fs.readFileSync(path.join(__dirname, "openapi.json"), "utf8")
);
// Need to wrap server setup in a function to handle async nature of JobQueue
const startApp = async () => {
// **************************
@@ -70,6 +77,9 @@ const startApp = async () => {
next();
});
// Swagger UI
app.use("/api-docs", swaggerUi.serve, swaggerUi.setup(openApiSpec));
//routes
app.use("/api/v1/auth", authRouter);
app.use("/api/v1/invite", inviteRouter);