0.11.21 : change on event and group

This commit is contained in:
2025-11-11 02:04:43 +01:00
parent 14e013bac1
commit 2bc35b639b
8 changed files with 234 additions and 32 deletions

View File

@@ -75,6 +75,16 @@ export default ({ strapi }: { strapi: Core.Strapi }) =>
`Event ${event.id} created by user ${userId} with owner relationship ${ownerRelationship.id}`
);
if (contextType === "group") {
await strapi
.service("api::group.group")
.addActivity(
contextId,
ctx.state.user?.username || `User ${userId}`,
`Evènement créé : ${event.title}`
);
}
ctx.send({ data: event }, 201);
} catch (error) {
strapi.log.error("Error in create event controller:", error);