Add documentation to functions
This commit is contained in:
parent
0a0d9b9802
commit
34e991f017
5 changed files with 18 additions and 7 deletions
|
@ -4,7 +4,7 @@ import express from "express";
|
|||
import {db, createUser} from "../types/db";
|
||||
|
||||
const router: Router = express.Router();
|
||||
|
||||
/**Middleware to check if a user is actually signed in */
|
||||
const adminCheck: Middleware = (req: Request, res: Response, next: NextFunction) => {
|
||||
if (!req.user)
|
||||
return res.status(403).send("You are not authorized to perform this action");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue