Skip to content

Commit

Permalink
Output empty array instead of null
Browse files Browse the repository at this point in the history
  • Loading branch information
mikroskeem committed Jul 11, 2019
1 parent cdb9d43 commit e21d05f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions server_jsonapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func setupJSONRoute(mux *http.ServeMux, config *tomlConfig) {
}
} else {
w.WriteHeader(http.StatusForbidden)
repos = make([]publicRepositoryInfo, 0)
}

json.NewEncoder(w).Encode(repos)
Expand Down

0 comments on commit e21d05f

Please sign in to comment.