Skip to content

feat: refactor rest utils and add middleware#33

Open
swarley18 wants to merge 1 commit intoFierro-Labs:mainfrom
swarley18:feat/refactor-utils
Open

feat: refactor rest utils and add middleware#33
swarley18 wants to merge 1 commit intoFierro-Labs:mainfrom
swarley18:feat/refactor-utils

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