converted all timestamps to string representation

This commit is contained in:
azivner
2017-12-10 12:56:59 -05:00
parent e3b708c322
commit 021f02bd8c
22 changed files with 304 additions and 96 deletions

View File

@@ -1,6 +1,7 @@
"use strict";
const migration = require('./migration');
const sql = require('./sql');
const utils = require('./utils');
const options = require('./options');
@@ -13,7 +14,7 @@ async function checkAuth(req, res, next) {
else if (!req.session.loggedIn && !utils.isElectron()) {
res.redirect("login");
}
else if (!await migration.isDbUpToDate()) {
else if (!await sql.isDbUpToDate()) {
res.redirect("migration");
}
else {
@@ -34,7 +35,7 @@ async function checkApiAuth(req, res, next) {
if (!req.session.loggedIn) {
res.status(401).send("Not authorized");
}
else if (await migration.isDbUpToDate()) {
else if (await sql.isDbUpToDate()) {
next();
}
else {