mirror of
https://github.com/detleph/server.git
synced 2026-09-04 08:36:06 +02:00
decommented user_auth
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/*import { Request, Response } from "express";
|
||||
import { Request, Response } from "express";
|
||||
import prisma from "../lib/prisma";
|
||||
import { mailClient } from "../lib/redis";
|
||||
import { nanoid } from "nanoid";
|
||||
@@ -214,4 +214,3 @@ export const verifyEmail = async (req: Request, res: Response) => {
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
*/
|
||||
+3
-2
@@ -18,6 +18,7 @@ import teamRouter from "./Routes/team.routes";
|
||||
import roleRouter from "./Routes/role.routes";
|
||||
import participantRouter from "./Routes/participant.routes";
|
||||
import { notFoundHandler, rootHandler } from "./Middleware/error/defaultRoutes";
|
||||
import { env } from "process";
|
||||
|
||||
// Set up async error handling
|
||||
require("express-async-errors");
|
||||
@@ -61,7 +62,7 @@ async function main() {
|
||||
);*/
|
||||
//Cors is for some reason broken on our server so set the Cors headers manually
|
||||
app.use(function (req, res, next) {
|
||||
res.header("Access-Control-Allow-Origin", "https://josport.at");
|
||||
res.header("Access-Control-Allow-Origin", process.env.DOMAIN);
|
||||
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
|
||||
next();
|
||||
});
|
||||
@@ -92,7 +93,7 @@ async function main() {
|
||||
app.use("/api/role-schemas", roleSchemaRouter);
|
||||
|
||||
app.use("/api/media", mediaRouter);
|
||||
|
||||
|
||||
app.use("/api/users", userRouter);
|
||||
|
||||
app.use("/api/teams", teamRouter);
|
||||
|
||||
Reference in New Issue
Block a user