16bugs JavaScript: from Zero to Hero
Log in

JavaScript: from Zero to Hero

#146 move paths and view names to consts

Reported by Volkan Ozcelik · 14 Jul 2018, 05:31

Status
New
Priority
Normal
Assigned to
Volkan Ozcelik
Category
Lessons
Version
None

const init = app => {
// paths to consts.
app.get('/dashboard', csrfProtection, authenticate, (req, res) => {
res.render('dashboard', { // view names to consts.
alias: (req.session && req.session.user && req.session.user.alias) || ''
});
});
};

History

14 Jul 2018, 05:31Volkan Ozcelik submitted the bug