14325: Move magic number to const.
[arvados.git] / lib / dispatchcloud / dispatcher.go
index ae954a2db9834e2f08571c13cbb3c3a41a3b13b6..e4a881aeba5ab4be8dbfca0fed2bf9c5b9ad8d10 100644 (file)
@@ -176,7 +176,7 @@ func (disp *dispatcher) run() {
 // Management API: all active and queued containers.
 func (disp *dispatcher) apiContainers(w http.ResponseWriter, r *http.Request) {
        var resp struct {
-               Items []container.QueueEnt
+               Items []container.QueueEnt `json:"items"`
        }
        qEntries, _ := disp.queue.Entries()
        for _, ent := range qEntries {
@@ -188,7 +188,7 @@ func (disp *dispatcher) apiContainers(w http.ResponseWriter, r *http.Request) {
 // Management API: all active instances (cloud VMs).
 func (disp *dispatcher) apiInstances(w http.ResponseWriter, r *http.Request) {
        var resp struct {
-               Items []worker.InstanceView
+               Items []worker.InstanceView `json:"items"`
        }
        resp.Items = disp.pool.Instances()
        json.NewEncoder(w).Encode(resp)