Delete application when container doesn't exist
This commit is contained in:
parent
ba748f1134
commit
f6f26e89de
6
main.go
6
main.go
@ -457,10 +457,16 @@ func main() {
|
||||
App: app,
|
||||
}
|
||||
|
||||
status, err := container.Status()
|
||||
if err != nil {
|
||||
return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent)
|
||||
}
|
||||
if status != "no-container" {
|
||||
err = container.Delete()
|
||||
if err != nil {
|
||||
return c.JSONPretty(http.StatusInternalServerError, Message{Message: err.Error()}, JSONIndent)
|
||||
}
|
||||
}
|
||||
|
||||
err = apps.Delete(name)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user