Created
April 24, 2022 12:45
-
-
Save zalun/e27cd82e0b21d727443b8bc82999eb21 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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