0.11.21 : change on event and group
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user