Fix compilation errors

This commit is contained in:
SebClem 2024-07-11 17:07:32 +02:00
parent 0089b68bb2
commit c2e96cb52b
Signed by: sebclem
GPG Key ID: 5A4308F6A359EA50
2 changed files with 8 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import {
} from "../services/webdavConfigService.js"; } from "../services/webdavConfigService.js";
import { checkWebdavLogin } from "../services/webdavService.js"; import { checkWebdavLogin } from "../services/webdavService.js";
import type { BackupConfig } from "../types/services/backupConfig.js"; import type { BackupConfig } from "../types/services/backupConfig.js";
import { ValidationError } from "joi"; import type { ValidationError } from "joi";
import type { WebdavConfig } from "../types/services/webdavConfig.js"; import type { WebdavConfig } from "../types/services/webdavConfig.js";
const configRouter = express.Router(); const configRouter = express.Router();
@ -47,9 +47,9 @@ configRouter.put("/webdav", (req, res) => {
res.status(204); res.status(204);
res.send(); res.send();
}) })
.catch((error) => { .catch((error: ValidationError) => {
res.status(400); res.status(400);
if (error instanceof ValidationError) { if (error.details) {
res.json(error.details); res.json(error.details);
} else { } else {
res.json(error); res.json(error);

View File

@ -3,12 +3,12 @@
"compilerOptions": { "compilerOptions": {
"allowJs": true, "allowJs": true,
"outDir": "./dist", "outDir": "./dist",
"module": "NodeNext", "module": "nodenext",
"moduleResolution": "NodeNext", "moduleResolution": "nodenext",
"target": "es6", "target": "ES2022",
"sourceMap": true, "sourceMap": true,
"verbatimModuleSyntax": true, "verbatimModuleSyntax": true,
"strict": true, "strict": true
}, },
"include": ["src/**/*"] "include": ["src/**/*"]
} }