Commit 23deaedd authored by astaxie's avatar astaxie

add to beego

parent 538d39a7
...@@ -133,8 +133,8 @@ func (app *App) Run() { ...@@ -133,8 +133,8 @@ func (app *App) Run() {
} }
} }
func (app *App) Router(path string, c ControllerInterface) *App { func (app *App) Router(path string, c ControllerInterface, mappingMethods ...string) *App {
app.Handlers.Add(path, c) app.Handlers.Add(path, c, mappingMethods...)
return app return app
} }
...@@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App { ...@@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App {
return BeeApp return BeeApp
} }
func Router(rootpath string, c ControllerInterface) *App { func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App {
BeeApp.Router(rootpath, c) BeeApp.Router(rootpath, c, mappingMethods...)
return BeeApp return BeeApp
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment