fix: cleanupStorage

This commit is contained in:
Andras Bacsai
2022-07-22 15:16:51 +00:00
parent 4b57b8fe3d
commit c0e513127d
3 changed files with 18 additions and 17 deletions

View File

@@ -17,7 +17,8 @@ export async function hashPassword(password: string): Promise<string> {
export async function cleanupManually() {
try {
await cleanupDockerStorage('unix:///var/run/docker.sock', true, true)
const destination = await prisma.destinationDocker.findFirst({ where: { engine: '/var/run/docker.sock' } })
await cleanupDockerStorage(destination.id, true, true)
return {}
} catch ({ status, message }) {
return errorHandler({ status, message })