Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Unified Diff: milo/frontend/view_builder.go

Issue 2976393002: Milo: Fix ?limit= param (Closed)
Patch Set: review Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « milo/frontend/middleware.go ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: milo/frontend/view_builder.go
diff --git a/milo/frontend/view_builder.go b/milo/frontend/view_builder.go
index 901bbeebe2c4a5c9829cecd85fdb862eb06f69e3..49199a7296c680dbfc6f27ce24e2c65d93a26686 100644
--- a/milo/frontend/view_builder.go
+++ b/milo/frontend/view_builder.go
@@ -13,7 +13,11 @@ import (
// BuilderHandler is responsible for taking a universal builder ID and rendering
// the builder page (defined in ./appengine/templates/pages/builder.html).
func BuilderHandler(c *router.Context, builderID buildsource.BuilderID) {
- builder, err := builderID.Get(c.Context, c.Params.ByName("limit"), c.Params.ByName("cursor"))
+ limit := 25
+ if tLimit := GetLimit(c.Request, -1); tLimit >= 0 {
+ limit = tLimit
+ }
+ builder, err := builderID.Get(c.Context, limit, c.Request.FormValue("cursor"))
// TODO(iannucci, hinoka): make MiloBuild refer to annotation stream by
// host/prefix/path instead of by directly pulling it. Do all annotation
// stream rendering in the frontend.
« no previous file with comments | « milo/frontend/middleware.go ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698