Skip to content

Commit

Permalink
Update author controller to return object on post
Browse files Browse the repository at this point in the history
  • Loading branch information
FarzamMohammadi committed Jul 17, 2022
1 parent 8db5a4c commit 8babf2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/api/controllers/author.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def post(self):
else:
author = AuthorModel(name=name, profile_image=profile_image)
author.save_to_db()

return messages.AUTHOR_ADDED_SUCCESSFULLY, 200
return {"author": author.json()}, 200

@token_required
@author_ns.doc(
Expand Down

0 comments on commit 8babf2e

Please sign in to comment.