fix: remove duplicate function

pull/177/head
tycrek 2 years ago
parent 118039f849
commit 55401441fa
No known key found for this signature in database
GPG Key ID: FF8A54DCE404885A

@ -33,16 +33,6 @@ function buildResourceRouter() {
return resourceRouter;
}
/**
* Token authentication middleware
*/
const authMiddleware = (req: Request, res: Response, next: NextFunction) => {
const user = findFromToken(req.headers.authorization ?? '');
(user && user.admin)
? next()
: res.sendStatus(401);
};
export const onStart = () => {
RouterApi.use('/user', buildUserRouter());
RouterApi.use('/resource', buildResourceRouter());

Loading…
Cancel
Save