From 1ef1a4785f9b00bb66276a4dd91fd7a9a3a7d36e Mon Sep 17 00:00:00 2001 From: thomasrosen Date: Tue, 22 Nov 2022 12:47:12 +0100 Subject: [PATCH] moved teams.json into an api folder-path --- backend/index.js | 2 +- frontend/index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/index.js b/backend/index.js index da547ae..3f35dd0 100644 --- a/backend/index.js +++ b/backend/index.js @@ -223,7 +223,7 @@ function reshapeTeamData(teams) { return data } -app.get('/teams.json', function (req, res, next) { +app.get('/api/teams.json', function (req, res, next) { // todo reload the file every day once diff --git a/frontend/index.js b/frontend/index.js index 9667da2..04c0f7e 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -124,8 +124,8 @@ function renderTeamSelectedAutomatically() { } } function loadTeams() { - // load teams from ./teams.json - fetch('./teams.json') + // load teams from ./api/teams.json + fetch('./api/teams.json') .then(response => response.json()) .then(data => { teams = data.teams