Skip to content
Snippets Groups Projects

Feature/authsch integration

Merged bmate711 requested to merge feature/authsch_integration into dev
9 files
+ 144
3
Compare changes
  • Side-by-side
  • Inline
Files
9
+ 12
0
 
import {Request, Response, NextFunction} from "express";
 
 
const authenticated = () => (req : Request, res : Response, next: NextFunction ) =>{
 
if(req.session!.user)
 
next();
 
else{
 
res.status(403);
 
res.json({message: "You have to login to see this page"});
 
}
 
}
 
 
export default authenticated;
 
\ No newline at end of file
Loading