Right now you can apply to adopt a dog from the details page and type the url to access the application form, even if you're not logged-in. We would like to use ensured logged-in to protect the url and prevent this from happening.
The edit route is also accessible by typing in the url and we would use ensured logged-in to protect the url.
Code - Protect Routes
router.get('/dogs/:id/applications/new', applicationsCtrl.new)
router.get('/applications/:id/edit', applicationsCtrl.edit)
Comments
Right now you can apply to adopt a dog from the details page and type the url to access the application form, even if you're not logged-in. We would like to use ensured logged-in to protect the url and prevent this from happening.
The edit route is also accessible by typing in the url and we would use ensured logged-in to protect the url.