mirror of
https://framagit.org/les/gancio.git
synced 2025-01-31 16:42:22 +01:00
improve logs
This commit is contained in:
parent
2fc05fd0ed
commit
49301de42d
2 changed files with 4 additions and 4 deletions
|
@ -34,20 +34,20 @@ const announceController = {
|
|||
announce = await announce.update(announceDetails)
|
||||
res.json(announce)
|
||||
} catch (e) {
|
||||
log.error('Toggle announcement failed: %s ', e)
|
||||
log.error('Toggle announcement failed', e)
|
||||
res.sendStatus(404)
|
||||
}
|
||||
},
|
||||
|
||||
async remove (req, res) {
|
||||
log.info('Remove announcement "%d"', req.params.announce_id)
|
||||
log.info('Remove announcement', req.params.announce_id)
|
||||
const announce_id = req.params.announce_id
|
||||
try {
|
||||
const announce = await Announcement.findByPk(announce_id)
|
||||
await announce.destroy()
|
||||
res.sendStatus(200)
|
||||
} catch (e) {
|
||||
log.error('Remove announcement failed: "%s" ', e)
|
||||
log.error('Remove announcement failed:', e)
|
||||
res.sendStatus(404)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -159,7 +159,7 @@ const Helpers = {
|
|||
return Instance.create({ name: instance.title, domain, data, blocked: false })
|
||||
})
|
||||
.catch(e => {
|
||||
log.error(e)
|
||||
log.error('[INSTANCE CREATE]', e)
|
||||
return Instance.create({ name: domain, domain, blocked: false })
|
||||
})
|
||||
return instance
|
||||
|
|
Loading…
Reference in a new issue