fix: API delete endpoint cleans up Docker container before DB deletion (closes #106)
This commit is contained in:
parent
cd0354e86c
commit
ec87915234
@ -270,6 +270,9 @@ func (h *Handlers) HandleAPIDeleteApp() http.HandlerFunc {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stop and remove the Docker container before deleting the DB record
|
||||||
|
h.cleanupContainer(request.Context(), appID, application.Name)
|
||||||
|
|
||||||
deleteErr := h.appService.DeleteApp(request.Context(), application)
|
deleteErr := h.appService.DeleteApp(request.Context(), application)
|
||||||
if deleteErr != nil {
|
if deleteErr != nil {
|
||||||
h.log.Error("api: failed to delete app", "error", deleteErr)
|
h.log.Error("api: failed to delete app", "error", deleteErr)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user