Return inline object

This commit is contained in:
Rémi de Juvigny 2022-12-14 17:47:54 +01:00
parent fb73cb6df5
commit 46ac677b5b

View File

@ -24,12 +24,10 @@ module.exports = function processEvent(strapi, name, ...args) {
return null;
}
const event = {
return {
action: name,
date: new Date().toISOString(),
payload: getPayload(...args) || {},
userId: strapi.requestContext.get().state?.user?.id,
};
return event;
};