Login and register pages uses api functions, new styling and better handling in backend.

This commit is contained in:
2020-03-10 00:19:01 +01:00
parent 43bf312007
commit 9b7894ca7d
5 changed files with 197 additions and 122 deletions

View File

@@ -0,0 +1,13 @@
const mustBeAuthenticated = (req, res, next) => {
if (!req.isAuthenticated()) {
return res.status(401).send({
success: false,
message: "Du må være logget inn."
})
}
return next()
}
module.exports = mustBeAuthenticated;