Currently my routes look like this
'get /login': 'LoginController.showForm',
'post /login': 'LoginController.processForm'
So going to /login and submitting a form redirects me to /login with method POST but I get this error
You don't have permission to see the page you're trying to reach.
The controller file looks like this
module.exports = {
showForm: function(req, res) {
return res.view('login/form');
},
processForm: function(req, res) {
return res.send('works')
}
}
Config policies
module.exports.policies = {
LoginController: {
}
};