chore: drizzle config root

This commit is contained in:
Nicolas Meienberger
2025-10-31 22:05:28 +01:00
parent afeaf87bb0
commit c64e50bdec
9 changed files with 21 additions and 22 deletions

View File

@@ -92,9 +92,9 @@ export const repositoriesController = new Hono()
)
.post("/:name/restore", restoreSnapshotDto, validator("json", restoreSnapshotBody), async (c) => {
const { name } = c.req.param();
const { snapshotId, path, include, exclude } = c.req.valid("json");
const { snapshotId, include, exclude } = c.req.valid("json");
const result = await repositoriesService.restoreSnapshot(name, snapshotId, { path, include, exclude });
const result = await repositoriesService.restoreSnapshot(name, snapshotId, { include, exclude });
return c.json<RestoreSnapshotDto>(result, 200);
});

View File

@@ -219,7 +219,6 @@ export const listSnapshotFilesDto = describeRoute({
*/
export const restoreSnapshotBody = type({
snapshotId: "string",
path: "string?",
include: "string[]?",
exclude: "string[]?",
});

View File

@@ -164,11 +164,7 @@ const listSnapshotFiles = async (name: string, snapshotId: string, path?: string
const restoreSnapshot = async (
name: string,
snapshotId: string,
options?: {
path?: string;
include?: string[];
exclude?: string[];
},
options?: { include?: string[]; exclude?: string[] },
) => {
const repository = await db.query.repositoriesTable.findFirst({
where: eq(repositoriesTable.name, name),