Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz@veritasgenetics.com>
}
}
- if clusterId == "" && req.Method == "POST" {
+ if clusterId == "" && req.Method == "POST" && req.Header.Get("Content-Type") == "application/json" {
var hasClusterId struct {
ClusterID string `json:"cluster_id"`
}
err := json.NewDecoder(rdr).Decode(&hasClusterId)
if err != nil {
- // TODO
+ httpserver.Error(w, err.Error(), http.StatusBadRequest)
+ return
}
req.Body = ioutil.NopCloser(postBody)
location: "query",
required: false,
default: false
- }
+ },
+ cluster_id: {
+ type: 'string',
+ description: "Create object on a remote federated cluster instead of the current one.",
+ location: "query",
+ required: false,
+ },
}
end