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

Unified Diff: appengine/cmd/cron/ui/index.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/common.go ('k') | appengine/cmd/cron/ui/invocation.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/cmd/cron/ui/index.go
diff --git a/appengine/cmd/cron/ui/index.go b/appengine/cmd/cron/ui/index.go
index da80ad745253df7f24037d73bb05dea153663316..c22ba660b2af0e50c5187a1f45b9261c9651aafb 100644
--- a/appengine/cmd/cron/ui/index.go
+++ b/appengine/cmd/cron/ui/index.go
@@ -1,25 +1,21 @@
// 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 indexPage(c context.Context, w http.ResponseWriter, r *http.Request, p httprouter.Params) {
- jobs, err := config(c).Engine.GetAllCronJobs(c)
+func indexPage(c *router.Context) {
+ jobs, err := config(c.Context).Engine.GetAllCronJobs(c.Context)
if err != nil {
panic(err)
}
- templates.MustRender(c, w, "pages/index.html", map[string]interface{}{
- "Jobs": convertToSortedCronJobs(jobs, clock.Now(c).UTC()),
+ templates.MustRender(c.Context, c.Writer, "pages/index.html", map[string]interface{}{
+ "Jobs": convertToSortedCronJobs(jobs, clock.Now(c.Context).UTC()),
})
}
« no previous file with comments | « appengine/cmd/cron/ui/common.go ('k') | appengine/cmd/cron/ui/invocation.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698