1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00

update Blocks module

This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-09-24 17:35:49 +03:00
parent e0ac28c1bb
commit e7b40398aa
16 changed files with 198 additions and 105 deletions

View File

@@ -754,6 +754,13 @@ func (api *APIBuilder) createRoutes(errorCode int, methods []string, relativePat
mainHandlerFileName, mainHandlerFileNumber := context.HandlerFileLineRel(handlers[mainHandlerIndex])
// TODO: think of it.
if mainHandlerFileName == "<autogenerated>" {
// At PartyConfigure, 2nd+ level of routes it will get <autogenerated> but in reallity will be the same as the caller.
mainHandlerFileName = filename
mainHandlerFileNumber = line
}
// re-calculate mainHandlerIndex in favor of the middlewares.
mainHandlerIndex = len(beginHandlers) + mainHandlerIndex