Skip to content

Commit

Permalink
fix: barry 2024-07-13 20:03:06
Browse files Browse the repository at this point in the history
  • Loading branch information
kooksee committed Jul 13, 2024
1 parent 7a1beff commit c4d8bda
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions pkg/gateway/mux.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@ func (m *Mux) registerRouter(rule *methodWrapper) {
if rule.meta != nil {
m.opts.customOperationNames[rule.meta.Name] = rule
}

assert.Exit(m.routerTree.Add(http.MethodPost, rule.grpcFullMethod, rule.grpcFullMethod,
resolveBodyDesc(rule.grpcMethodPbDesc, "*", "*")))
}

func (m *Mux) registerService(gsd *grpc.ServiceDesc, ss interface{}) error {
Expand Down
4 changes: 2 additions & 2 deletions servers/grpcs/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,9 +370,9 @@ func (s *serviceImpl) DixInject(
httpServer.Group(apiPrefix1, httputil.StripPrefix(apiPrefix1, mux.Handler))
for _, m := range mux.GetRouteMethods() {
log.Info().
Str("method-name", m.Operation).
Str("operation", m.Operation).
Str("http-method", m.Method).
Str("http-path", assert.Must1(url.JoinPath(apiPrefix1, m.Path))).
Str("http-path", "/"+strings.Trim(apiPrefix1, "/")+m.Path).
Str("verb", m.Verb).
Any("path-vars", m.Vars).
Any("extras", m.Extras).
Expand Down

0 comments on commit c4d8bda

Please sign in to comment.