Skip to content

Instantly share code, notes, and snippets.

@zalun
Created April 24, 2022 12:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zalun/e27cd82e0b21d727443b8bc82999eb21 to your computer and use it in GitHub Desktop.
Save zalun/e27cd82e0b21d727443b8bc82999eb21 to your computer and use it in GitHub Desktop.
// src/index.js
"use strict";
module.exports = {
register(/*{ strapi }*/) {},
bootstrap({ strapi }) {
strapi.db.lifecycles.subscribe((event) => {
if (
event.action === "afterUpdate" &&
event.model.uid == "plugin::payu.transaction"
) {
strapi.service("api::product.product").handleTransactionUpdate(event);
}
});
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment