mirror of
https://github.com/Sebclem/hassio-nextcloud-backup.git
synced 2024-11-12 20:42:58 +01:00
Create backup folder on setting save
This commit is contained in:
parent
cd4032cd6f
commit
8b1285780b
@ -9,7 +9,10 @@ import {
|
||||
saveWebdavConfig,
|
||||
validateWebdavConfig,
|
||||
} from "../services/webdavConfigService.js";
|
||||
import { checkWebdavLogin } from "../services/webdavService.js";
|
||||
import {
|
||||
checkWebdavLogin,
|
||||
createBackupFolder,
|
||||
} from "../services/webdavService.js";
|
||||
import type { BackupConfig } from "../types/services/backupConfig.js";
|
||||
import type { ValidationError } from "joi";
|
||||
import type { WebdavConfig } from "../types/services/webdavConfig.js";
|
||||
@ -46,6 +49,9 @@ configRouter.put("/webdav", (req, res) => {
|
||||
.then(() => {
|
||||
return checkWebdavLogin(req.body as WebdavConfig, true);
|
||||
})
|
||||
.then(() => {
|
||||
return createBackupFolder(req.body as WebdavConfig);
|
||||
})
|
||||
.then(() => {
|
||||
saveWebdavConfig(req.body as WebdavConfig);
|
||||
res.status(204).send();
|
||||
|
Loading…
Reference in New Issue
Block a user