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 18, 2022
1 parent 8db5a4c commit 2fc7978
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/api/controllers/author.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def post(self):
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 2fc7978

Please sign in to comment.