From 4b6b04259ff07cb3644b442d8a5e308c6a5bce8c Mon Sep 17 00:00:00 2001 From: some Date: Wed, 9 Oct 2024 11:45:02 -0400 Subject: [PATCH] Upgrade to latest router --- go.mod | 2 +- go.sum | 4 ++-- router.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go.mod b/go.mod index f6985d2..ddca931 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.23.1 require ( somehole.com/common/log v0.1.3 somehole.com/common/security v0.2.1 - somehole.com/service/router v0.17.0 + somehole.com/service/router v0.18.0 ) require ( diff --git a/go.sum b/go.sum index bc2d151..b79e870 100644 --- a/go.sum +++ b/go.sum @@ -8,5 +8,5 @@ somehole.com/common/log v0.1.3 h1:2PAui0+5EryTAHqVUZQeepLcJTGssHKz2OL+jBknHI0= somehole.com/common/log v0.1.3/go.mod h1:NS2eHnN120GA6oFbBm3XhB5yHww0eXTbLuMQYZxYNyA= somehole.com/common/security v0.2.1 h1:H7TpErYKsCOxKYYie75jU7azO5vEgeqrQ9uA+AjXafA= somehole.com/common/security v0.2.1/go.mod h1:6SMKdIrfxT460XXWafpD6A9yT/ykwipGsGztA5g5vVM= -somehole.com/service/router v0.17.0 h1:uKod3d3fLxXHK6DVhvA84FGW56XnQpIkkeM5L5Yw2hg= -somehole.com/service/router v0.17.0/go.mod h1:F+/sNY4/ei7C9QD5+iA+gUHugcOAcrWspHKwX8d8oiM= +somehole.com/service/router v0.18.0 h1:k+YLjUvRKl/n0tM8UhprXr5gxF2lhLKkv+HNu1+WqtM= +somehole.com/service/router v0.18.0/go.mod h1:F+/sNY4/ei7C9QD5+iA+gUHugcOAcrWspHKwX8d8oiM= diff --git a/router.go b/router.go index f4383ad..961994d 100644 --- a/router.go +++ b/router.go @@ -44,9 +44,9 @@ func NewRouter(r *router.Router, logger log.Logger, optionalEndpoints ...Endpoin } func (ro *Router) RegisterCallbackServer(srv server.CallbackServer) { - ro.Register(ro.CallbackEndpoint, router.NewServer(&server.CallbackRequestBuilder{}, &server.CallbackResponse{}, ro.Logger, srv.Callback)) + ro.Register(ro.CallbackEndpoint, router.NewServer(srv.Callback).SetLogger(ro.Logger)) } func (ro *Router) RegisterTokenServer(srv server.TokenServer) { - ro.Register(ro.TokenEndpoint, router.NewServer(&server.TokenRequestBuilder{}, &server.TokenResponse{}, ro.Logger, srv.Token)) + ro.Register(ro.TokenEndpoint, router.NewServer(srv.Token).SetLogger(ro.Logger)) }