magento2-module-webhook icon indicating copy to clipboard operation
magento2-module-webhook copied to clipboard

Add consistent serialization

Open wcurtis opened this issue 10 years ago • 0 comments

Right now serializing the payload of the webhook is super basic, just calling getData() on the model. This is all kinds of bad because it will expose sensitive information like password hashes and such. A better strategy would be to create a serializer for each resource. An even better strategy is if we could re-use the serializer for the REST API so our webhook data has an identical json structure to the API. Boom.

All feedback or recommendations welcome

wcurtis avatar Sep 17 '15 22:09 wcurtis