Skip to content

Commit

Permalink
http-api: fixes a bug where an app doesn't contain any tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
christianparpart committed Mar 29, 2016
1 parent 12961bf commit 4b27c18
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ func (mmsd *mmsdService) v1Instances(w http.ResponseWriter, r *http.Request) {
return
}

if len(app.Tasks) == 0 {
w.WriteHeader(http.StatusNoContent)
return
}

// appJson, err := json.MarshalIndent(app, "", " ")
// w.Write(appJson)
// fmt.Fprintf(w, "\n")
Expand Down

0 comments on commit 4b27c18

Please sign in to comment.