mirror of
https://github.com/ershisan99/coolify.git
synced 2025-12-29 12:33:59 +00:00
feat: add host path to any container
This commit is contained in:
@@ -1340,16 +1340,16 @@ export async function getStorages(request: FastifyRequest<OnlyId>) {
|
||||
export async function saveStorage(request: FastifyRequest<SaveStorage>, reply: FastifyReply) {
|
||||
try {
|
||||
const { id } = request.params;
|
||||
const { path, newStorage, storageId } = request.body;
|
||||
const { hostPath, path, newStorage, storageId } = request.body;
|
||||
|
||||
if (newStorage) {
|
||||
await prisma.applicationPersistentStorage.create({
|
||||
data: { path, application: { connect: { id } } }
|
||||
data: { hostPath, path, application: { connect: { id } } }
|
||||
});
|
||||
} else {
|
||||
await prisma.applicationPersistentStorage.update({
|
||||
where: { id: storageId },
|
||||
data: { path }
|
||||
data: { hostPath, path }
|
||||
});
|
||||
}
|
||||
return reply.code(201).send();
|
||||
|
||||
@@ -96,6 +96,7 @@ export interface DeleteSecret extends OnlyId {
|
||||
}
|
||||
export interface SaveStorage extends OnlyId {
|
||||
Body: {
|
||||
hostPath?: string;
|
||||
path: string;
|
||||
newStorage: boolean;
|
||||
storageId: string;
|
||||
|
||||
Reference in New Issue
Block a user