16 lines
487 B
JavaScript
16 lines
487 B
JavaScript
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" });
|
|
}
|
|
}
|