From 5bb047c96004d2a017423b093957d2b478c4ce56 Mon Sep 17 00:00:00 2001 From: Georg Pfuetzenreuter Date: Sun, 8 May 2022 13:59:55 +0200 Subject: Shell deletion logic Signed-off-by: Georg Pfuetzenreuter --- src/main/java/net/libertacasa/pubsh/web/WebApplication.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/net/libertacasa/pubsh/web/WebApplication.java') diff --git a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java index 7c9f870..bd497d9 100644 --- a/src/main/java/net/libertacasa/pubsh/web/WebApplication.java +++ b/src/main/java/net/libertacasa/pubsh/web/WebApplication.java @@ -157,7 +157,8 @@ public class WebApplication { System.out.printf("Deletion triggered for ID %s by %s (%s)\n", id, userid, username); - Docker.deleteContainer(id); + //Docker.deleteContainer(id); + Docker.deleteShell(username, id); return("redirect:/portal"); } @@ -176,7 +177,7 @@ public class WebApplication { System.out.printf("Image deletion triggered for ID %s by %s (%s)\n", id, userid, username); try { - Docker.deleteImage(username, id); + Docker.deleteImage(id); String returnmessage = "Success - removed image with ID " + id + "!"; redirectAttributes.addFlashAttribute("message", returnmessage); } catch (com.github.dockerjava.api.exception.ConflictException exception) { -- cgit v1.2.3