From 34b95fe822368a7ada9bd5cfdefe3675ae3116fd Mon Sep 17 00:00:00 2001 From: flifloo Date: Tue, 18 Aug 2020 15:49:58 +0200 Subject: [PATCH] Some semicolon fix --- app.js | 2 +- public/javascripts/orders.js | 2 +- routes/commands.js | 2 +- routes/login.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index c194bc3..9526b47 100644 --- a/app.js +++ b/app.js @@ -19,7 +19,7 @@ let app = express(); let sess = { secret: process.env.NODE_ENV === "test" ? "Keyboard Cat" : require("./config/config.json").secret, cookie: {} -} +}; if (app.get("env") === "production") { app.set("trust proxy", 1); diff --git a/public/javascripts/orders.js b/public/javascripts/orders.js index 7ef5581..cc92cb2 100644 --- a/public/javascripts/orders.js +++ b/public/javascripts/orders.js @@ -20,6 +20,6 @@ document.querySelectorAll(".department").forEach(e => collapse(e, "user")); document.querySelectorAll(".user").forEach(e => collapse(e, "order")); -document.querySelectorAll(".order").forEach(e => collapse(e, "sandwich")) +document.querySelectorAll(".order").forEach(e => collapse(e, "sandwich")); date.addEventListener("change", () => window.location.href = "?date="+date.value); diff --git a/routes/commands.js b/routes/commands.js index e4b8138..6285a3f 100644 --- a/routes/commands.js +++ b/routes/commands.js @@ -20,7 +20,7 @@ router.get("/", sessionCheck(2), async (req, res) => { commands[i.Command.DepartmentName][name] = {}; if (!(i.Command.id in commands[i.Command.DepartmentName][name])) - commands[i.Command.DepartmentName][name][i.Command.id] = [] + commands[i.Command.DepartmentName][name][i.Command.id] = []; commands[i.Command.DepartmentName][name][i.Command.id].push(i); } res.render("commands", {title: "SOD - Commands", user: req.session.user, commands: commands, date: date}); diff --git a/routes/login.js b/routes/login.js index 4f3ac17..e047d36 100644 --- a/routes/login.js +++ b/routes/login.js @@ -4,7 +4,7 @@ const models = require("../models"); router.get("/", async (req, res) => { if (req.session.user) - res.redirect("/") + res.redirect("/"); else res.render("login", { title: "SOD - Login" }); })