diff --git a/app.js b/app.js index 11515a5..430bd57 100644 --- a/app.js +++ b/app.js @@ -109,13 +109,11 @@ global.syzoj = { }).catch((err) => { this.log(err); res.locals.user = req.session.user_id = null; - }).finally(() => { - next(); }) } else { res.locals.user = req.session.user_id = null; - next(); } + next(); }); // Active item on navigator bar diff --git a/package.json b/package.json index 918cdf3..7a41555 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "An OnlineJudge System for OI", "main": "app.js", "scripts": { - "start": "babel-node app.js", + "start": "node --harmony-async-await app.js", "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { @@ -25,8 +25,6 @@ "dependencies": { "adm-zip": "^0.4.7", "ansi-to-html": "^0.4.2", - "babel-cli": "^6.18.0", - "babel-preset-es2017": "^6.16.0", "body-parser": "^1.15.2", "cookie-parser": "^1.4.3", "ejs": "^2.5.2",