feat: user profile page - save info + change pwd

This commit is contained in:
NGPixel
2020-04-05 18:51:48 -04:00
committed by Nicolas Giard
parent c7f3c9d908
commit 1e4d513252
19 changed files with 1613 additions and 1062 deletions

View File

@@ -278,6 +278,10 @@ router.get(['/i', '/i/:id'], async (req, res, next) => {
* Profile
*/
router.get(['/p', '/p/*'], (req, res, next) => {
if (!req.user || req.user.id < 1 || req.user.id === 2) {
return res.render('unauthorized', { action: 'view' })
}
_.set(res.locals, 'pageMeta.title', 'User Profile')
res.render('profile')
})