Update CSV data fetching to use API endpoint in Mannschaften components
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 5s
Some checks failed
Code Analysis (JS/Vue) / analyze (push) Failing after 5s
This commit modifies the loadMannschaften function across multiple components to fetch CSV data from the new API endpoint '/api/mannschaften' instead of the previous static file path '/data/mannschaften.csv'. This change enhances data retrieval consistency and aligns with the updated data management strategy in the application.
This commit is contained in:
@@ -924,7 +924,7 @@ const toggleMobileSubmenu = (menu) => {
|
||||
const loadMannschaften = async () => {
|
||||
try {
|
||||
const attempt = async () => {
|
||||
const url = `/data/mannschaften.csv?_t=${Date.now()}`
|
||||
const url = `/api/mannschaften?_t=${Date.now()}`
|
||||
const response = await fetch(url, { cache: 'no-store' })
|
||||
if (!response.ok) return null
|
||||
return await response.text()
|
||||
|
||||
Reference in New Issue
Block a user