Skip to content

Commit

Permalink
fix(app/api): add missing response code and msg
Browse files Browse the repository at this point in the history
  • Loading branch information
jakuboskera committed Jun 2, 2022
1 parent d067a9a commit 5beaa39
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/api/entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def get(self):

@api.doc("create_entry")
@api.expect(entry, validate=True)
@api.response(201, "Created")
def post(self, data=None):
"""
Create a new entry
Expand All @@ -46,7 +47,7 @@ def post(self, data=None):
new_entry = Entries(data["name"], data["comment"])
db.session.add(new_entry)
db.session.commit()
return make_response(jsonify(created=True), 201)
return make_response(jsonify("Created"), 201)


@api.route("/<int:id>")
Expand Down

0 comments on commit 5beaa39

Please sign in to comment.