removed unused function

This commit is contained in:
Miodec 2021-06-10 16:49:45 +01:00
parent 15936a99e2
commit 7d2b6e1cac

View file

@ -43,19 +43,7 @@ connectDB()
const authRouter = require("./api/routes/auth");
app.use("/auth", authRouter);
async function authenticateToken(req, res, next) {
const authHeader = req.headers["authorization"];
const token = await admin
.auth()
.verifyIdToken(req.headers.authorization.split(" ")[1]);
if (token == null) {
return res.sendStatus(401);
} else {
req.name = token.name;
req.uid = token.user_id;
next();
}
}
// NON-ROUTE FUNCTIONS