minor
This commit is contained in:
@@ -90,11 +90,7 @@ const eventController = {
|
|||||||
let event = await Event.findByPk(id, {
|
let event = await Event.findByPk(id, {
|
||||||
plain: true,
|
plain: true,
|
||||||
attributes: {
|
attributes: {
|
||||||
exclude: ['createdAt', 'updatedAt', 'start_datetime', 'end_datetime'],
|
exclude: ['createdAt', 'updatedAt']
|
||||||
include: [
|
|
||||||
[Sequelize.literal('start_datetime*1000'), 'start_datetime'],
|
|
||||||
[Sequelize.literal('end_datetime*1000'), 'end_datetime']
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
include: [
|
include: [
|
||||||
{ model: Tag, attributes: ['tag', 'weigth'], through: { attributes: [] } },
|
{ model: Tag, attributes: ['tag', 'weigth'], through: { attributes: [] } },
|
||||||
@@ -104,6 +100,9 @@ const eventController = {
|
|||||||
order: [ [Comment, 'id', 'DESC'] ]
|
order: [ [Comment, 'id', 'DESC'] ]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
event.start_datetime = event.start_datetime*1000
|
||||||
|
event.end_datetime = event.end_datetime*1000
|
||||||
|
|
||||||
if (event && (event.is_visible || is_admin)) {
|
if (event && (event.is_visible || is_admin)) {
|
||||||
res.json(event)
|
res.json(event)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ If you want to `)
|
|||||||
const settings = require('./api/controller/settings')
|
const settings = require('./api/controller/settings')
|
||||||
await settings.set('allow_registration', true)
|
await settings.set('allow_registration', true)
|
||||||
await settings.set('allow_anon_event', true)
|
await settings.set('allow_anon_event', true)
|
||||||
|
await settings.set('allow_recurrent_event', true)
|
||||||
|
await settings.set('recurrent_event_visible', true)
|
||||||
|
await settings.set('allow_comments', true)
|
||||||
|
|
||||||
// add default notification
|
// add default notification
|
||||||
consola.info('Add default notification')
|
consola.info('Add default notification')
|
||||||
|
|||||||
Reference in New Issue
Block a user