1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-09 12:20:18 +00:00

beego:fix the some regexp routes to different func

This commit is contained in:
astaxie
2014-06-12 23:08:05 +08:00
parent 3b807845f2
commit 117904be73
4 changed files with 62 additions and 43 deletions

View File

@ -256,11 +256,12 @@ func addPrefix(t *Tree, prefix string) {
if t.wildcard != nil {
addPrefix(t.wildcard, prefix)
}
if t.leaf != nil {
if c, ok := t.leaf.runObject.(*controllerInfo); ok {
for _, l := range t.leaves {
if c, ok := l.runObject.(*controllerInfo); ok {
c.pattern = prefix + c.pattern
}
}
}
// Namespace Condition