Skip to content

Commit

Permalink
fix: ensure config fetches are not cached
Browse files Browse the repository at this point in the history
  • Loading branch information
cadriel committed Sep 30, 2020
1 parent c36210a commit 928695b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Vue.use(DayJSPlugin)
Vue.use(FiltersPlugin)

// Load API configuration
fetch('/config.json')
fetch('/config.json', { cache: 'no-store' })
.then(res => res.json())
.then(apiConfig => {
// Commit the api configuration to our store.
store.commit('config/onInitApiConfig', apiConfig)
return fetch(apiConfig.apiUrl + '/server/files/config/' + Globals.SETTINGS_FILENAME)
return fetch(apiConfig.apiUrl + '/server/files/config/' + Globals.SETTINGS_FILENAME, { cache: 'no-store' })
.then(res => (!res.ok) ? undefined : res.json())
.then((fileConfig) => {
// Init the store. This should include any GUI settings we've loaded from moonraker.
Expand Down

0 comments on commit 928695b

Please sign in to comment.