I want to sync the data from the wix site to another system.
For this I decided to use the afterUpdate data-hook on required collection.
Since the code involved REST api calls I have used a promise which resolves to the same item it got after the API calls.
Now the API calls do work but for some reason the promise is not resolving in the hook and keep getting error `cannot read property _id of undefined` Since there is no example code on Promise based data hook in the reference docs I am unable to proceed.
Can someone provide me an example of how to use Promises in the data hook?