Skip to content

Commit

Permalink
convert delete method's response meta to an object
Browse files Browse the repository at this point in the history
Per the JSON API specification: "Where specified, a meta member can be used .. The value of each meta member MUST be an object" (http://jsonapi.org/format/#document-meta)
  • Loading branch information
Nate Emmons authored Apr 22, 2017
1 parent 8179be4 commit 50b040b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_rest_jsonapi/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ def delete(self, *args, **kwargs):
obj = self._data_layer.get_object(kwargs)
self._data_layer.delete_object(obj, kwargs)

result = {'meta': 'Object successful deleted'}
result = {'meta': {'message': 'Object successfully deleted'}}
self.after_delete(result)
return result

Expand Down

0 comments on commit 50b040b

Please sign in to comment.