-
Notifications
You must be signed in to change notification settings - Fork 50
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
Added api endpoints #320
Added api endpoints #320
Conversation
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.
Needs some polish and definitely tests but cool 👍
Codecov Report
@@ Coverage Diff @@
## next #320 +/- ##
==========================================
- Coverage 83.07% 80.33% -2.74%
==========================================
Files 31 31
Lines 2659 2782 +123
Branches 188 214 +26
==========================================
+ Hits 2209 2235 +26
- Misses 418 515 +97
Partials 32 32
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
The handling of error states is in some cases a bit inconsistent (there are quite a few conditions that cause internal server error response).
Otherwise most things seem to work as expected (based on some manual testing)
if username != member.username: | ||
return HttpResponseBadRequest("Username does not match member_id") |
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.
Is there a reason for requiring a user identifier both as a parameter in the post body and as a part of the buystring?
@Zaph-x fails black |
This pull request aims to get us closer to moving away from a monolithic application.
This is done by creating API endpoints, which exposes mostly public facing data in stregsystemet through GET requests.
Furthermore, a sale endpoint which accepts POST requests has been added.