-
Notifications
You must be signed in to change notification settings - Fork 45
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
create edit participant endpoint (fixes #61) #212
create edit participant endpoint (fixes #61) #212
Conversation
Status code changed to 200 |
backend/resources/participant.py
Outdated
db.session.add(participant) | ||
db.session.commit() | ||
return {"participant": participant_schema.dump(participant)}, HTTPStatus.OK |
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.
Please remove: "participant":
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.
done
backend/resources/participant.py
Outdated
@@ -26,7 +28,7 @@ def post(self): | |||
json_data = request.get_json(force=True) | |||
if not json_data: | |||
return {'message': 'No input data provided'}, \ | |||
HTTPStatus.BAD_REQUEST | |||
HTTPStatus.BAD_REQUEST |
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.
Won't that fit in one line?
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.
changed to one line
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.
@kristhina pull request overall looks pretty solid, but I have few questions regarding the architecture of the application that would be great to have resolved before moving forward here.
Can you @stanislawK @jacekkalbarczyk @OtisRed and @w1stler dig into these questions and we will try to answer them at the next hacknight?
@magul please refer to the changes that has been made |
Testing:
send "put" request to "participants/1/":
Headers: Authorization: Bearer access_token; Content-Type: application/json
Body:
{
"first_name" : "janusz007",
"github": "januszek2"
}