feat: backup schedule creation form

This commit is contained in:
Nicolas Meienberger
2025-10-28 22:34:56 +01:00
parent 37a22b260f
commit d1c1adaba7
14 changed files with 746 additions and 610 deletions

View File

@@ -5,6 +5,7 @@ import {
createBackupScheduleDto,
deleteBackupScheduleDto,
getBackupScheduleDto,
getBackupScheduleForVolumeDto,
listBackupSchedulesDto,
runBackupNowDto,
updateBackupScheduleBody,
@@ -25,6 +26,12 @@ export const backupScheduleController = new Hono()
return c.json({ schedule }, 200);
})
.get("/volume/:volumeId", getBackupScheduleForVolumeDto, async (c) => {
const volumeId = c.req.param("volumeId");
const schedule = await backupsService.getScheduleForVolume(Number(volumeId));
return c.json(schedule, 200);
})
.post("/", createBackupScheduleDto, validator("json", createBackupScheduleBody), async (c) => {
const body = c.req.valid("json");