Skip to content
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

fix(auth): return out of auth api route functions #353

Merged
merged 2 commits into from
Sep 27, 2024

Conversation

fabiangigler
Copy link
Contributor

@fabiangigler fabiangigler commented Jul 25, 2024

return out of auth api route functions when a 401 status code or other auth errors are encountered.

Essentially the isAdmin check would return the correct HTTP header, but still execute the rest of the code just fine. Returning the reply.code() and reply.send() statements (wherever there is more code below them) fixes this behaviour.

This fixes the issue mentioned here: #258

Copy link

vercel bot commented Jul 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview Sep 27, 2024 10:41pm
peppermint ❌ Failed (Inspect) Sep 27, 2024 10:41pm

@potts99
Copy link
Collaborator

potts99 commented Sep 27, 2024

thanks man 👍

@potts99 potts99 merged commit c6ac8f6 into Peppermint-Lab:master Sep 27, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants