Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Protect Routes #292
Protect Routes #292
Changes from 43 commits
6e6b893
582f36e
80b03ce
75bafae
feebe5a
237d1ab
75dff21
a849e37
3a558fb
075b5c0
f07ca2b
4956113
9c43972
756263e
d650934
b9539d5
a475878
3cb3da0
31d0e56
f7a275b
b528b79
7dcd54a
02423dc
6f51255
43fc3f9
015b71e
161f226
8f6d8cd
a4205fc
bfad6e5
c35bfb3
7dc2c24
aaf5d8c
a318a7b
cba4774
1c1187a
b4ce9fc
e94d326
b155ca7
a7f3908
0825507
290bcbe
5edc4eb
f27aafb
b710af3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you raising an exception on an
handle_params
function?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what he is doing is raising an exception making the current request fail with 404 status, which automatically shows the 404 page. Smart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I see. Why not wrap this logic inside a function and call it on a Plug implemented at the route level? That way, we could also use that function when deciding to display (or not) the "Edit" button on the show of an activity. Agreed? 🙏
Edit: This was supposed to be a reply to the already created thread 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a good idea. Will clean up the code quite a bit