Reputation: 11
I am stuck on what seems like a pretty straight-forward task: calling the afterSave method in a custom module that inherits from apostrophe-pieces. My objective is to make an XHR call any time my custom content type is created or updated. I've tried putting the call in /lib/modules/<my-module>/index.js (where I would think it would go) and /lib/modules/<my-module>/lib/api.js without luck. Thanks in advance for some guidance on this.
Upvotes: 0
Views: 93
Reputation: 2157
You want to hook into afterSave
from the module's construct
method, I commented on your gist
https://gist.github.com/nodots/b41e14b4ccffb35e66fbeb84b7dd77bf
Upvotes: 1