send entity with updates in it in publish webhook

This commit is contained in:
Marc-Roig 2023-02-28 09:19:26 +01:00
parent 948dbb3121
commit 37e980fc7e

View File

@ -212,7 +212,7 @@ module.exports = ({ strapi }) => ({
const updatedEntity = await strapi.entityService.update(uid, entity.id, params);
await emitEvent(ENTRY_PUBLISH, entity, uid);
await emitEvent(ENTRY_PUBLISH, updatedEntity, uid);
// If relations were populated, relations count will be returned instead of the array of relations.
if (isRelationsPopulateEnabled(uid)) {
@ -239,7 +239,7 @@ module.exports = ({ strapi }) => ({
const updatedEntity = await strapi.entityService.update(uid, entity.id, params);
await emitEvent(ENTRY_UNPUBLISH, entity, uid);
await emitEvent(ENTRY_UNPUBLISH, updatedEntity, uid);
// If relations were populated, relations count will be returned instead of the array of relations.
if (isRelationsPopulateEnabled(uid)) {