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

Unified Diff: appengine/gaemiddleware/routes.go

Issue 2043423004: Make HTTP middleware easier to use (Closed) Base URL: https://github.com/luci/luci-go@master
Patch Set: Update tests 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
Index: appengine/gaemiddleware/routes.go
diff --git a/appengine/gaemiddleware/routes.go b/appengine/gaemiddleware/routes.go
index e52cf252dff223198b99c65d8219e718aa4b9a4f..62b53b75379cf08a05a7e4783112af188bc3fbcf 100644
--- a/appengine/gaemiddleware/routes.go
+++ b/appengine/gaemiddleware/routes.go
@@ -5,8 +5,7 @@
package gaemiddleware
import (
- "github.com/julienschmidt/httprouter"
- "github.com/luci/luci-go/server/middleware"
+ "github.com/luci/luci-go/server/router"
"github.com/luci/luci-go/server/settings/admin"
gaeauth "github.com/luci/luci-go/appengine/gaeauth/server"
@@ -19,8 +18,8 @@ import (
// work (e.g. authentication related routes, time series monitoring, etc).
//
// 'base' is expected to be BaseProd or its derivative.
-func InstallHandlers(r *httprouter.Router, base middleware.Base) {
- gaeauth.InstallWebHandlers(r, base)
- tsmon.InstallHandlers(r, base)
- admin.InstallHandlers(r, base, &gaeauth.UsersAPIAuthMethod{})
+func InstallHandlers(r *router.Router, handlers []router.Handler) {
+ gaeauth.InstallWebHandlers(r, handlers)
+ tsmon.InstallHandlers(r, handlers)
+ admin.InstallHandlers(r, handlers, &gaeauth.UsersAPIAuthMethod{})
}

Powered by Google App Engine
This is Rietveld 408576698