diff --git a/package.json b/package.json index cf1583b3..8be28380 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gancio", - "version": "0.9.26", + "version": "0.9.27", "description": "A shared agenda for local communities", "author": "lesion", "scripts": { diff --git a/server/api/controller/event.js b/server/api/controller/event.js index 25a57d30..4f732e18 100644 --- a/server/api/controller/event.js +++ b/server/api/controller/event.js @@ -4,6 +4,7 @@ const { Op } = require('sequelize') const lodash = require('lodash') const { event: Event, comment: Comment, tag: Tag, place: Place, notification: Notification } = require('../models') const Sequelize = require('sequelize') +const notifier = require('../../notifier') const eventController = { @@ -113,10 +114,11 @@ const eventController = { try { event.is_visible = true await event.save() - // insert notification - const notifications = await eventController.getNotifications(event) - await event.setNotifications(notifications) + res.sendStatus(200) + + // send notification + notifier.notifyEvent(event.id) } catch (e) { res.sendStatus(404) }