mirror of
https://github.com/TwiN/gatus.git
synced 2026-02-10 10:49:20 +00:00
fix(ui): Ensure retrievedConfig is set to true after fetching configuration (#1359)
This commit is contained in:
@@ -197,13 +197,12 @@ const buttons = computed(() => {
|
|||||||
const fetchConfig = async () => {
|
const fetchConfig = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${SERVER_URL}/api/v1/config`, { credentials: 'include' })
|
const response = await fetch(`${SERVER_URL}/api/v1/config`, { credentials: 'include' })
|
||||||
retrievedConfig.value = true
|
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
const data = await response.json()
|
const data = await response.json()
|
||||||
config.value = data
|
config.value = data
|
||||||
announcements.value = data.announcements || []
|
announcements.value = data.announcements || []
|
||||||
}
|
}
|
||||||
|
retrievedConfig.value = true
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to fetch config:', error)
|
console.error('Failed to fetch config:', error)
|
||||||
retrievedConfig.value = true
|
retrievedConfig.value = true
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user