tko22 / flask-boilerplate

Simple flask boilerplate with Postgres, Docker, and Heroku/Zeit now
https://github.com/tko22/flask-boilerplate/wiki
MIT License
301 stars 100 forks source link

fix: POST /persons is now returning data from DB #28

Closed pasenidis closed 3 years ago

pasenidis commented 3 years ago

Hello, first things first: thank you for creating this boilerplate - it actually saves a lot of my time.

I suppose that instead of new_person._id, your code should be referring to the .id property, without the underscore. I consider this is essential because some developers may get confused with this example.

If you are running this locally, the endpoint is

POST http://localhost:5000/persons
Content-Type: application/json

{
    "name": "Joe",
    "email": "joe@example.com"
}

I've tested this and it works: image