From a514c9c1e64f974e3f15791cdaa9dd51a4e55ca6 Mon Sep 17 00:00:00 2001 From: Jonathan Nau Date: Fri, 8 Dec 2023 17:32:50 +0100 Subject: [PATCH] fix: return empty array instead of null --- api/controllers/presenceController.js | 2 +- docker-compose.traefik.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/api/controllers/presenceController.js b/api/controllers/presenceController.js index 10ff86d..a8c58bc 100644 --- a/api/controllers/presenceController.js +++ b/api/controllers/presenceController.js @@ -61,7 +61,7 @@ exports.getPresence = function(req, res) { Sequelize.QueryTypes.SELECT, function (results) { if (results.length === 0) { - res.json({'students': null}); + res.json({'students': []}); } else { res.json({'students': results}); } diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 2ee3be0..37e8896 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -3,6 +3,7 @@ version: "3" services: traefik: image: traefik:v2.5 + restart: unless-stopped container_name: "traefik" command: # - "--api.insecure=true"