move container start to api.

This commit is contained in:
Miroslav Šedivý
2021-05-31 21:15:04 +02:00
parent 654bfb3c01
commit 0b381ab264
2 changed files with 5 additions and 7 deletions
+5
View File
@@ -40,6 +40,11 @@ func (manager *ApiManagerCtx) roomCreate(w http.ResponseWriter, r *http.Request)
return
}
if err := manager.rooms.Start(ID); err != nil {
http.Error(w, err.Error(), 500)
return
}
response, err := manager.rooms.GetEntry(ID)
if err != nil {
http.Error(w, err.Error(), 500)
-7
View File
@@ -316,13 +316,6 @@ func (manager *RoomManagerCtx) Create(settings types.RoomSettings) (string, erro
return "", err
}
// Start the actual container
err = manager.client.ContainerStart(context.Background(), container.ID, dockerTypes.ContainerStartOptions{})
if err != nil {
return "", err
}
return container.ID, nil
}