refactoring locales management

This commit is contained in:
les
2020-02-20 18:37:10 +01:00
parent 0416ddb1a3
commit 5769d1a3ed
18 changed files with 68 additions and 55 deletions

View File

@@ -272,12 +272,9 @@ const eventController = {
// return created event to the client
res.json(event)
// send notification (mastodon/email)
// only if user is authenticated
if (req.user && !event.recurrent) {
const notifier = require('../../notifier')
notifier.notifyEvent('Create', event.id)
}
// send notifications (mastodon / email)
const notifier = require('../../notifier')
notifier.notifyEvent('Create', event.id)
} catch (e) {
res.sendStatus(400)
debug(e)