| Index: server/auth/db.go
|
| diff --git a/server/auth/db.go b/server/auth/db.go
|
| index 61ca54c985f49dedcc81ae1554443c862807a67e..2d01ff8a70691ba6516f578f56337f4ed6ed4e78 100644
|
| --- a/server/auth/db.go
|
| +++ b/server/auth/db.go
|
| @@ -8,11 +8,9 @@ import (
|
| "errors"
|
| "fmt"
|
| "net"
|
| - "net/http"
|
| "strings"
|
| "time"
|
|
|
| - "github.com/julienschmidt/httprouter"
|
| "golang.org/x/net/context"
|
|
|
| "github.com/luci/luci-go/common/clock"
|
| @@ -22,7 +20,7 @@ import (
|
|
|
| "github.com/luci/luci-go/server/auth/identity"
|
| "github.com/luci/luci-go/server/auth/service/protocol"
|
| - "github.com/luci/luci-go/server/middleware"
|
| + "github.com/luci/luci-go/server/router"
|
| "github.com/luci/luci-go/server/secrets"
|
| )
|
|
|
| @@ -87,9 +85,9 @@ func UseDB(c context.Context, f DBFactory) context.Context {
|
|
|
| // WithDB is middleware that sets given DBFactory in the context before calling
|
| // a handler.
|
| -func WithDB(h middleware.Handler, f DBFactory) middleware.Handler {
|
| - return func(c context.Context, rw http.ResponseWriter, r *http.Request, p httprouter.Params) {
|
| - h(UseDB(c, f), rw, r, p)
|
| +func WithDB(f DBFactory) router.Handler {
|
| + return func(c *router.Context) {
|
| + c.Context = UseDB(c.Context, f)
|
| }
|
| }
|
|
|
|
|