Merge pull request 'Update candidate paths for CSV file retrieval in mannschaften.get.js' (#10) from dev into main
All checks were successful
Code Analysis and Production Deploy / analyze (push) Has been skipped
Code Analysis and Production Deploy / deploy-production (push) Successful in 2m14s
Code Analysis and Production Deploy / deploy-test (push) Has been skipped

Reviewed-on: #10
This commit was merged in pull request #10.
This commit is contained in:
2026-05-05 15:20:52 +02:00
2 changed files with 5 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "harheimertc-website",
"version": "1.1.4",
"version": "1.1.5",
"description": "Moderne Webseite für den Harheimer Tischtennis Club",
"private": true,
"type": "module",

View File

@@ -15,8 +15,11 @@ export default defineEventHandler(async (event) => {
const cwd = process.cwd()
const filename = 'mannschaften.csv'
// Prefer server/data, then .output/public/data, then public/data
// Prefer CMS write target first (server/data/public-data),
// then legacy locations.
const candidates = [
path.join(cwd, 'server/data/public-data', filename),
path.join(cwd, '../server/data/public-data', filename),
path.join(cwd, '.output/server/data', filename),
path.join(cwd, 'server/data', filename),
path.join(cwd, '.output/public/data', filename),