refactor res.locals and settings

This commit is contained in:
lesion
2022-02-26 21:27:40 +01:00
parent 9e2ed063b6
commit cf3e1c69fa
20 changed files with 133 additions and 102 deletions

View File

@@ -56,7 +56,7 @@ if (config.status !== 'READY') {
```
*/
api.get('/ping', (req, res) => res.sendStatus(200))
api.get('/user', isAuth, (req, res) => res.json(req.user))
api.get('/user', isAuth, (req, res) => res.json(res.locals.user))
api.post('/user/recover', userController.forgotPassword)