1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 09:57:01 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2021-01-09 05:41:20 +02:00
parent 72c2dafd2e
commit 8aedf6bc32
36 changed files with 99 additions and 130 deletions

View File

@@ -56,15 +56,13 @@ func (g GRPC) Apply(c *ControllerActivator) {
path := path.Join(g.ServiceName, m.Name)
if g.Strict {
c.app.Router.HandleMany(http.MethodPost, path, pre)
} else {
if route := c.Handle(http.MethodPost, path, m.Name, pre); route != nil {
bckp := route.Description
route.Description = "gRPC"
if g.Strict {
route.Description += "-only"
}
route.Description += " " + bckp // e.g. "gRPC controller"
} else if route := c.Handle(http.MethodPost, path, m.Name, pre); route != nil {
bckp := route.Description
route.Description = "gRPC"
if g.Strict {
route.Description += "-only"
}
route.Description += " " + bckp // e.g. "gRPC controller"
}
}