1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 20:40:54 +00:00
This commit is contained in:
astaxie 2013-11-26 11:05:12 +08:00
parent e09e642a83
commit 7b405e9af7

View File

@ -268,7 +268,7 @@ func buildFilter(pattern string, filter FilterFunc) *FilterRouter {
func (p *ControllerRegistor) AddFilter(pattern, action string, filter FilterFunc) { func (p *ControllerRegistor) AddFilter(pattern, action string, filter FilterFunc) {
mr := buildFilter(pattern, filter) mr := buildFilter(pattern, filter)
switch action { switch action {
case "BeforRouter": case "BeforeRouter":
p.filters[BeforeRouter] = append(p.filters[BeforeRouter], mr) p.filters[BeforeRouter] = append(p.filters[BeforeRouter], mr)
case "AfterStatic": case "AfterStatic":
p.filters[AfterStatic] = append(p.filters[AfterStatic], mr) p.filters[AfterStatic] = append(p.filters[AfterStatic], mr)