mirror of
https://github.com/m1k1o/neko-rooms.git
synced 2026-11-03 07:01:35 -06:00
move container start to api.
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user