mirror of
https://github.com/nicotsx/ironmount.git
synced 2025-12-10 12:10:51 +01:00
feat: delete volume
This commit is contained in:
@@ -9,7 +9,7 @@ import { volumeConfigSchema } from "../../db/schema";
|
||||
export const listVolumesResponse = type({
|
||||
volumes: type({
|
||||
name: "string",
|
||||
mountpoint: "string",
|
||||
path: "string",
|
||||
createdAt: "number",
|
||||
}).array(),
|
||||
});
|
||||
@@ -41,9 +41,12 @@ export const createVolumeBody = type({
|
||||
});
|
||||
|
||||
export const createVolumeResponse = type({
|
||||
name: "string",
|
||||
mountpoint: "string",
|
||||
createdAt: "number",
|
||||
message: "string",
|
||||
volume: type({
|
||||
name: "string",
|
||||
path: "string",
|
||||
createdAt: "number",
|
||||
}),
|
||||
});
|
||||
|
||||
export const createVolumeDto = describeRoute({
|
||||
@@ -62,3 +65,27 @@ export const createVolumeDto = describeRoute({
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Delete a volume
|
||||
*/
|
||||
export const deleteVolumeResponse = type({
|
||||
message: "string",
|
||||
});
|
||||
|
||||
export const deleteVolumeDto = describeRoute({
|
||||
description: "Delete a volume",
|
||||
operationId: "deleteVolume",
|
||||
validateResponse: true,
|
||||
tags: ["Volumes"],
|
||||
responses: {
|
||||
200: {
|
||||
description: "Volume deleted successfully",
|
||||
content: {
|
||||
"application/json": {
|
||||
schema: resolver(deleteVolumeResponse),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user