Fix some bugs
This commit is contained in:
parent
7896616c16
commit
02c5195d9c
2 changed files with 3 additions and 3 deletions
|
@ -41,9 +41,9 @@ export async function create(ctx, data) {
|
|||
data.settings.main = '<%- text %> - <%- finished %>'
|
||||
}
|
||||
|
||||
let graphics = ctx.db.get('graphics').insert(data)
|
||||
let graphics = ctx.db.get('graphics')
|
||||
await graphics.insert(data).write()
|
||||
let graphic = graphics.last().value()
|
||||
await graphics.write()
|
||||
|
||||
ctx.io.emit('graphic.single', graphic)
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ lowdb().then(function(db) {
|
|||
|
||||
fileServer.serve(req, res, function (err) {
|
||||
if (err) {
|
||||
logger.error(err);
|
||||
log.error(err);
|
||||
|
||||
res.writeHead(err.status, err.headers);
|
||||
res.end(err.message);
|
||||
|
|
Loading…
Reference in a new issue