added message for 401
This commit is contained in:
parent
7d64b466a1
commit
108caa0baa
1 changed files with 1 additions and 1 deletions
|
@ -8,7 +8,7 @@ import config from "../config.json"
|
|||
|
||||
const checkIfLoggedIn = (req: Request, res: Response, next: NextFunction) => {
|
||||
if (req.isAuthenticated()) return next()
|
||||
res.status(401).send()
|
||||
res.status(401).send("Not authenticated")
|
||||
}
|
||||
|
||||
export default (app: Express): void => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue