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

Unified Diff: appengine/cmd/cron/ui/project.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: gaemiddleware: add middleware func for WithProd Created 4 years, 6 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 | « appengine/cmd/cron/ui/job.go ('k') | appengine/cmd/dm/distributor/handlers.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/cron/ui/project.go
diff --git a/appengine/cmd/cron/ui/project.go b/appengine/cmd/cron/ui/project.go
index 583841b1b10f196d9e91e18a5053fefc719bd959..623092f65c8067cd4818935385238573a8fc4f03 100644
--- a/appengine/cmd/cron/ui/project.go
+++ b/appengine/cmd/cron/ui/project.go
@@ -1,27 +1,23 @@
// Copyright 2015 The LUCI Authors. All rights reserved.
// Use of this source code is governed under the Apache License, Version 2.0
// that can be found in the LICENSE file.
package ui
import (
- "net/http"
-
- "github.com/julienschmidt/httprouter"
- "golang.org/x/net/context"
-
"github.com/luci/luci-go/common/clock"
+ "github.com/luci/luci-go/server/router"
"github.com/luci/luci-go/server/templates"
)
-func projectPage(c context.Context, w http.ResponseWriter, r *http.Request, p httprouter.Params) {
- projectID := p.ByName("ProjectID")
- jobs, err := config(c).Engine.GetProjectCronJobs(c, projectID)
+func projectPage(c *router.Context) {
+ projectID := c.Params.ByName("ProjectID")
+ jobs, err := config(c.Context).Engine.GetProjectCronJobs(c.Context, projectID)
if err != nil {
panic(err)
}
- templates.MustRender(c, w, "pages/project.html", map[string]interface{}{
+ templates.MustRender(c.Context, c.Writer, "pages/project.html", map[string]interface{}{
"ProjectID": projectID,
- "Jobs": convertToSortedCronJobs(jobs, clock.Now(c).UTC()),
+ "Jobs": convertToSortedCronJobs(jobs, clock.Now(c.Context).UTC()),
})
}
« no previous file with comments | « appengine/cmd/cron/ui/job.go ('k') | appengine/cmd/dm/distributor/handlers.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698