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:
@@ -158,7 +158,7 @@ async function fetchCsvText(url) {
|
||||
|
||||
const loadMannschaften = async () => {
|
||||
try {
|
||||
const csv = await fetchCsvText('/data/mannschaften.csv')
|
||||
const csv = await fetchCsvText('/api/mannschaften')
|
||||
if (!csv) return
|
||||
const lines = csv.split('\n').filter(line => line.trim() !== '')
|
||||
|
||||
|
||||
@@ -324,7 +324,7 @@ const loadData = async () => {
|
||||
// Lade Spielplandaten und Mannschaften parallel
|
||||
const [spielplanResponse, mannschaftenResponse] = await Promise.all([
|
||||
fetch('/api/spielplan'),
|
||||
fetchCsvText('/data/mannschaften.csv')
|
||||
fetchCsvText('/api/mannschaften')
|
||||
])
|
||||
|
||||
// Spielplandaten verarbeiten
|
||||
|
||||
Reference in New Issue
Block a user