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

create edit participant endpoint (fixes #61) #212

Merged

Conversation

kristhina
Copy link
Member

@kristhina kristhina commented Nov 13, 2019

Testing:

  • make start
  • make populate_database
  • login in postman with given username: "/auth/login"
  • copy access_token
    send "put" request to "participants/1/":
    Headers: Authorization: Bearer access_token; Content-Type: application/json
    Body:
    {
    "first_name" : "janusz007",
    "github": "januszek2"
    }

@kristhina kristhina changed the title [WIP] 61 create edit participant endpoint create edit participant endpoint (fixes #61) Nov 20, 2019
@kristhina
Copy link
Member Author

db.session.add(participant)
db.session.commit()
return {"participant": participant_schema.dump(participant)}, HTTPStatus.OK
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove: "participant":

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -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
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed to one line

magul
magul previously requested changes Nov 28, 2019
Copy link
Member

@magul magul left a 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?

backend/resources/participant.py Outdated Show resolved Hide resolved
backend/resources/participant.py Show resolved Hide resolved
backend/resources/participant.py Outdated Show resolved Hide resolved
backend/resources/participant.py Show resolved Hide resolved
@w1stler w1stler requested a review from magul December 11, 2019 18:36
@OtisRed
Copy link
Contributor

OtisRed commented Dec 18, 2019

@magul please refer to the changes that has been made

@w1stler w1stler removed the request for review from magul January 8, 2020 18:21
@w1stler w1stler merged commit 38ca158 into CodeForPoznan:master Jan 8, 2020
OtisRed pushed a commit to OtisRed/codeforpoznan.pl_v3 that referenced this pull request Aug 10, 2022
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.

4 participants