Update candidate paths for CSV file retrieval in mannschaften.get.js
- Adjusted the logic to prioritize the new CMS write target for public data. - Updated comments to clarify the order of candidate paths for file retrieval.
This commit is contained in:
@@ -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