aboutsummaryrefslogtreecommitdiff
path: root/server.js
diff options
context:
space:
mode:
authorJoel Kronqvist <work.joelkronqvist@gmail.com>2022-11-05 13:07:11 +0200
committerJoel Kronqvist <work.joelkronqvist@gmail.com>2022-11-05 13:07:11 +0200
commit0f2d56eafd01b5e728f96cf327f1a3e881a21225 (patch)
treeed845c70cd9408398235cc8d1cd9e00105a2f5b3 /server.js
parent4a9dca9ffccb087135c6e2d0eebae45cd567036d (diff)
downloadLYLLRuoka-0f2d56eafd01b5e728f96cf327f1a3e881a21225.tar.gz
LYLLRuoka-0f2d56eafd01b5e728f96cf327f1a3e881a21225.zip
Hid vegetarian food when it is the same as the normal food. Added date logging to init.sh.
Diffstat (limited to 'server.js')
-rw-r--r--server.js2
1 files changed, 1 insertions, 1 deletions
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 {