mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-12-23 22:46:44 +01:00
Fix compilation errors
This commit is contained in:
parent
0089b68bb2
commit
c2e96cb52b
@ -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);
|
||||
|
@ -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/**/*"]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user