esLint
This commit is contained in:
@@ -9,7 +9,7 @@ export default async function handler(
|
||||
res: NextApiResponse
|
||||
) {
|
||||
try {
|
||||
const result: Record<number, any[]> = {};
|
||||
const result: Record<number, unknown[]> = {};
|
||||
|
||||
for (let i = 1; i <= 8; i++) {
|
||||
const filePath = path.join(
|
||||
@@ -22,10 +22,11 @@ export default async function handler(
|
||||
|
||||
try {
|
||||
const fileContent = await fs.readFile(filePath, "utf-8");
|
||||
result[99 + i] = JSON.parse(fileContent); // z. B. 100 für AE1, 101 für AE2
|
||||
} catch (err) {
|
||||
result[99 + i] = JSON.parse(fileContent); // z. B. 100 für AE1, 101 für AE2
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
`Mock-Datei für analogInput${i} nicht gefunden oder fehlerhaft.`
|
||||
`Mock-Datei für analogInput${i} nicht gefunden oder fehlerhaft.`,
|
||||
error
|
||||
);
|
||||
result[99 + i] = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user