linting, cleanup

This commit is contained in:
2020-08-23 13:08:04 +02:00
parent 49f6bcf30e
commit 39f9f17b95
8 changed files with 34 additions and 153 deletions

View File

@ -8,10 +8,16 @@
'use strict';
const knex = require ('knex');
const fs = require ('fs');
let db = null;
async function init (use_fake_seed) {
// eslint-disable-next-line no-sync
if (use_fake_seed && fs.existsSync ('db.sqlite'))
// eslint-disable-next-line no-sync
fs.unlinkSync ('db.sqlite');
db = knex ({
client: 'sqlite',
connection: { filename: 'db.sqlite' },