mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
refactor: snapshots flat response
This commit is contained in:
@@ -69,9 +69,7 @@ export const repositoriesController = new Hono()
|
||||
};
|
||||
});
|
||||
|
||||
const response = { snapshots };
|
||||
|
||||
return c.json<ListSnapshotsDto>(response, 200);
|
||||
return c.json<ListSnapshotsDto>(snapshots, 200);
|
||||
})
|
||||
.get(
|
||||
"/:name/snapshots/:snapshotId/files",
|
||||
|
||||
@@ -139,9 +139,7 @@ export const snapshotSchema = type({
|
||||
duration: "number",
|
||||
});
|
||||
|
||||
const listSnapshotsResponse = type({
|
||||
snapshots: snapshotSchema.array(),
|
||||
});
|
||||
const listSnapshotsResponse = snapshotSchema.array();
|
||||
|
||||
export type ListSnapshotsDto = typeof listSnapshotsResponse.infer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user