fix #27, fix #25, fix #26, fix #20, fix #19

This commit is contained in:
lesion
2019-03-18 01:42:42 +01:00
parent b93cf91dbd
commit 7111b4578b
31 changed files with 270 additions and 70 deletions

View File

@@ -82,6 +82,18 @@ const eventController = {
}
},
async unconfirm (req, res) {
const id = req.params.event_id
const event = await Event.findByPk(id)
try {
await event.update({ is_visible: false })
res.send(200)
} catch (e) {
res.send(404)
}
},
async getUnconfirmed (req, res) {
const events = await Event.findAll({
where: {