mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-12 23:20:25 +08:00
removed unused function
This commit is contained in:
parent
15936a99e2
commit
7d2b6e1cac
1 changed files with 1 additions and 13 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue