Skip to content

Commit

Permalink
fix named routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Levchenko committed Aug 7, 2023
1 parent 8d8bddf commit c403c82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ func (app *App) Name(name string) Router {

for _, routes := range app.stack {
for _, route := range routes {
if route.Path == app.latestRoute.path {
if route.Path == app.latestRoute.path && route.Method == app.latestRoute.Method {
route.Name = name

if route.group != nil {
Expand Down

0 comments on commit c403c82

Please sign in to comment.