mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
chore: drizzle config root
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -219,7 +219,6 @@ export const listSnapshotFilesDto = describeRoute({
|
||||
*/
|
||||
export const restoreSnapshotBody = type({
|
||||
snapshotId: "string",
|
||||
path: "string?",
|
||||
include: "string[]?",
|
||||
exclude: "string[]?",
|
||||
});
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user