fix: \pages\api\mockData\webService\GisLinesStatusMock.js hat gefählt

This commit is contained in:
ISA
2025-03-07 10:08:32 +01:00
parent c6269b75a3
commit 6e9d278aa3
2 changed files with 16 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
import fs from "fs";
import path from "path";
export default function handler(req, res) {
const filePath = path.join(process.cwd(), "webServiceMockdata", "GisLinesStatusMock.json");
try {
const fileContent = fs.readFileSync(filePath, "utf8");
const data = JSON.parse(fileContent);
res.status(200).json(data);
} catch (error) {
console.error(`Error reading GisLinesStatusMock.json:`, error);
res.status(500).json({ message: "Error loading mock data" });
}
}