rework not found
This commit is contained in:
@ -58,7 +58,7 @@ func wsDownload(req *restful.Request, resp *restful.Response) {
|
||||
asset := req.PathParameter("asset")
|
||||
|
||||
if token == "" || asset == "" {
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
return
|
||||
}
|
||||
|
||||
@ -95,7 +95,7 @@ func wsDownload(req *restful.Request, resp *restful.Response) {
|
||||
})
|
||||
|
||||
if !found {
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
return
|
||||
}
|
||||
|
||||
@ -115,7 +115,7 @@ func wsDownload(req *restful.Request, resp *restful.Response) {
|
||||
case "cluster":
|
||||
cluster := cfg.ClusterByName(spec.Name)
|
||||
if cluster == nil {
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
return
|
||||
}
|
||||
|
||||
@ -125,13 +125,13 @@ func wsDownload(req *restful.Request, resp *restful.Response) {
|
||||
resp.Write([]byte(cluster.Addons))
|
||||
|
||||
default:
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
}
|
||||
|
||||
case "host":
|
||||
host := cfg.Host(spec.Name)
|
||||
if host == nil {
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
return
|
||||
}
|
||||
|
||||
@ -145,6 +145,6 @@ func wsDownload(req *restful.Request, resp *restful.Response) {
|
||||
renderHost(resp.ResponseWriter, req.Request, asset, host, cfg)
|
||||
|
||||
default:
|
||||
wsNotFound(req, resp)
|
||||
wsNotFound(resp)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user