Skip to content

Commit

Permalink
refactor: instead of returning SUCCESS return the data which was modi…
Browse files Browse the repository at this point in the history
…fied (#225)
  • Loading branch information
alincmt authored Jun 22, 2022
1 parent 334b919 commit 75e581a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions licenseware/schema_namespace/mongo_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def post_data(self, flask_request: Request):
if len(inserted_docs) == 0:
return "Could not insert data", 400

return "SUCCESS"
return data

def put_data(self, flask_request: Request):

Expand All @@ -143,7 +143,7 @@ def put_data(self, flask_request: Request):
if updated_docs == 0:
return "Query had no match", 404

return "SUCCESS"
return new_data

def delete_data(self, flask_request: Request):

Expand Down

0 comments on commit 75e581a

Please sign in to comment.