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