fix: error response for docker
This commit is contained in:
@@ -110,6 +110,10 @@ func Server() error {
|
|||||||
// access container
|
// access container
|
||||||
resp, err := docker.BuildRunContainer(PortsInt, GPU, ContainerName)
|
resp, err := docker.BuildRunContainer(PortsInt, GPU, ContainerName)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
c.String(http.StatusInternalServerError, fmt.Sprintf("error: %s", err))
|
||||||
|
}
|
||||||
|
|
||||||
if ProxyIpAddr.Ipv4 != "" {
|
if ProxyIpAddr.Ipv4 != "" {
|
||||||
err := frp.StartFRPCDockerContainer(ProxyIpAddr.Ipv4, ProxyIpAddr.ProxyPort, resp)
|
err := frp.StartFRPCDockerContainer(ProxyIpAddr.Ipv4, ProxyIpAddr.ProxyPort, resp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -117,10 +121,6 @@ func Server() error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
c.String(http.StatusInternalServerError, fmt.Sprintf("error: %s", err))
|
|
||||||
}
|
|
||||||
|
|
||||||
c.JSON(http.StatusOK, resp)
|
c.JSON(http.StatusOK, resp)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user