Skip to content

Commit

Permalink
fix: return empty array instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
Sadikum committed Dec 8, 2023
1 parent 2a50e93 commit a514c9c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion api/controllers/presenceController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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});
}
Expand Down
1 change: 1 addition & 0 deletions docker-compose.traefik.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ version: "3"
services:
traefik:
image: traefik:v2.5
restart: unless-stopped
container_name: "traefik"
command:
# - "--api.insecure=true"
Expand Down

0 comments on commit a514c9c

Please sign in to comment.