This commit is contained in:
les
2020-02-20 20:58:49 +01:00
parent 54ee36dc18
commit a802314f24
3 changed files with 4 additions and 2 deletions

View File

@@ -31,6 +31,7 @@
p(v-html="$t('event.where_description')") p(v-html="$t('event.where_description')")
el-autocomplete(v-model='event.place.name' @blur='selectPlace($event.target.value)' el-autocomplete(v-model='event.place.name' @blur='selectPlace($event.target.value)'
highlight-first-item :fetch-suggestions='filterPlaces' @select='selectPlace') highlight-first-item :fetch-suggestions='filterPlaces' @select='selectPlace')
div {{$t("common.address")}} div {{$t("common.address")}}
el-input.mb-3(ref='address' v-model='event.place.address' :disabled='disableAddress') el-input.mb-3(ref='address' v-model='event.place.address' :disabled='disableAddress')

View File

@@ -202,7 +202,7 @@ const eventController = {
async delNotification (req, res) { async delNotification (req, res) {
const remove_code = req.params.code const remove_code = req.params.code
try { try {
const notification = await Notification.findOne({ where: { remove_code: { [Op.eq]: remove_code } } }) const notification = await Notification.findOne({ where: { remove_code } })
await notification.destroy() await notification.destroy()
} catch (e) { } catch (e) {
return res.sendStatus(404) return res.sendStatus(404)

View File

@@ -5,7 +5,8 @@ const fediverseHelpers = require('./federation/helpers')
const { const {
event: Event, notification: Notification, event_notification: EventNotification, event: Event, notification: Notification, event_notification: EventNotification,
user: User, place: Place, tag: Tag, ap_user: APUser } = require('./api/models') user: User, place: Place, tag: Tag
} = require('./api/models')
const eventController = require('./api/controller/event') const eventController = require('./api/controller/event')
const notifier = { const notifier = {