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

feat: refactor rest utils and add middleware #33

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

swarley18
Copy link

  • refactored the JSON write functions into a utils folder
  • moved the Pins structs to a models folder
  • added a middleware that does handles the verification of tokens and adds token to the context
    • now there is not a need to check the auth token at every endpoint

TODO: test locally. Everything should work. Write test for middleware, didn't since I'm not sure how the tests are to be written, this is a good framework for tests

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