mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
Fix https://github.com/iris-contrib/community-board/issues/10 and upgrade the minor version number
Former-commit-id: 02f6656aceb890217bfc19688d7f45224df274ec
This commit is contained in:
@@ -147,6 +147,7 @@ func (rb *APIBuilder) Handle(method string, registeredPath string, handlers ...c
|
||||
}
|
||||
// global
|
||||
rb.routes.register(r)
|
||||
|
||||
// per -party
|
||||
rb.apiRoutes = append(rb.apiRoutes, r)
|
||||
// should we remove the rb.apiRoutes on the .Party (new children party) ?, No, because the user maybe use this party later
|
||||
@@ -163,6 +164,11 @@ func (rb *APIBuilder) Party(relativePath string, handlers ...context.Handler) Pa
|
||||
parentPath = parentPath[1:] // remove first slash
|
||||
}
|
||||
|
||||
// this is checked later on but for easier debug is better to do it here:
|
||||
if rb.relativePath[0] == '/' && relativePath[0] == '/' {
|
||||
parentPath = parentPath[1:] // remove first slash if parent ended with / and new one started with /.
|
||||
}
|
||||
|
||||
fullpath := parentPath + relativePath
|
||||
// append the parent's +child's handlers
|
||||
middleware := joinHandlers(rb.middleware, handlers)
|
||||
|
||||
Reference in New Issue
Block a user