fix(ui): Ensure retrievedConfig is set to true after fetching configuration (#1359)

This commit is contained in:
TwiN
2025-10-21 08:06:02 -04:00
committed by GitHub
parent 15813d4297
commit 394602bc47
2 changed files with 2 additions and 3 deletions

View File

@@ -197,13 +197,12 @@ const buttons = computed(() => {
const fetchConfig = async () => {
try {
const response = await fetch(`${SERVER_URL}/api/v1/config`, { credentials: 'include' })
retrievedConfig.value = true
if (response.status === 200) {
const data = await response.json()
config.value = data
announcements.value = data.announcements || []
}
retrievedConfig.value = true
} catch (error) {
console.error('Failed to fetch config:', error)
retrievedConfig.value = true