feat: backup schedule frontend

This commit is contained in:
Nicolas Meienberger
2025-10-30 18:18:11 +01:00
parent 9628310d53
commit cce2d356fe
14 changed files with 379 additions and 146 deletions

View File

@@ -7,6 +7,7 @@ import {
getRepositoryDto,
listRepositoriesDto,
listSnapshotsDto,
listSnapshotsFilters,
type DeleteRepositoryDto,
type GetRepositoryDto,
type ListRepositoriesDto,
@@ -38,9 +39,11 @@ export const repositoriesController = new Hono()
return c.json<DeleteRepositoryDto>({ message: "Repository deleted" }, 200);
})
.get("/:name/snapshots", listSnapshotsDto, async (c) => {
.get("/:name/snapshots", listSnapshotsDto, validator("query", listSnapshotsFilters), async (c) => {
const { name } = c.req.param();
const res = await repositoriesService.listSnapshots(name);
const { volumeId } = c.req.valid("query");
const res = await repositoriesService.listSnapshots(name, Number(volumeId));
const snapshots = res.map((snapshot) => {
const { summary } = snapshot;