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";
import { checkWebdavLogin } from "../services/webdavService.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";
const configRouter = express.Router();
@ -47,9 +47,9 @@ configRouter.put("/webdav", (req, res) => {
res.status(204);
res.send();
})
.catch((error) => {
.catch((error: ValidationError) => {
res.status(400);
if (error instanceof ValidationError) {
if (error.details) {
res.json(error.details);
} else {
res.json(error);

View File

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