From 0f2d56eafd01b5e728f96cf327f1a3e881a21225 Mon Sep 17 00:00:00 2001 From: Joel Kronqvist Date: Sat, 5 Nov 2022 13:07:11 +0200 Subject: Hid vegetarian food when it is the same as the normal food. Added date logging to init.sh. --- server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server.js') diff --git a/server.js b/server.js index 905fe63..c2b0449 100644 --- a/server.js +++ b/server.js @@ -283,7 +283,7 @@ async function buildMain(args) res["food-header"] = `Kouluruoka ${weekdays[day]}`; res["food"] = "Päivän ruoka puuttuu tietokannasta."; } - if (vege[0] !== undefined) { + if ((vege[0] !== undefined) && (vege[0].food !== res["food"])) { res["vege-header"] = vege[0].header; res["vege"] = vege[0].food; } else { -- cgit v1.2.3