Update candidate paths for CSV file retrieval in mannschaften.get.js #10
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "harheimertc-website",
|
"name": "harheimertc-website",
|
||||||
"version": "1.1.4",
|
"version": "1.1.5",
|
||||||
"description": "Moderne Webseite für den Harheimer Tischtennis Club",
|
"description": "Moderne Webseite für den Harheimer Tischtennis Club",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
|||||||
@@ -15,8 +15,11 @@ export default defineEventHandler(async (event) => {
|
|||||||
const cwd = process.cwd()
|
const cwd = process.cwd()
|
||||||
const filename = 'mannschaften.csv'
|
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 = [
|
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, '.output/server/data', filename),
|
||||||
path.join(cwd, 'server/data', filename),
|
path.join(cwd, 'server/data', filename),
|
||||||
path.join(cwd, '.output/public/data', filename),
|
path.join(cwd, '.output/public/data', filename),
|
||||||
|
|||||||
Reference in New Issue
Block a user