mirror of
https://github.com/voltbonn/diversity.volt.link.git
synced 2024-06-28 17:00:55 +00:00
moved teams.json into an api folder-path
This commit is contained in:
parent
bc130ea589
commit
1ef1a4785f
|
@ -223,7 +223,7 @@ function reshapeTeamData(teams) {
|
||||||
return data
|
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
|
// todo reload the file every day once
|
||||||
|
|
||||||
|
|
|
@ -124,8 +124,8 @@ function renderTeamSelectedAutomatically() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function loadTeams() {
|
function loadTeams() {
|
||||||
// load teams from ./teams.json
|
// load teams from ./api/teams.json
|
||||||
fetch('./teams.json')
|
fetch('./api/teams.json')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then(data => {
|
.then(data => {
|
||||||
teams = data.teams
|
teams = data.teams
|
||||||
|
|
Loading…
Reference in a new issue