add to beego
Showing
1 changed file
with
4 additions
and
4 deletions
| ... | @@ -133,8 +133,8 @@ func (app *App) Run() { | ... | @@ -133,8 +133,8 @@ func (app *App) Run() { |
| 133 | } | 133 | } |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | func (app *App) Router(path string, c ControllerInterface) *App { | 136 | func (app *App) Router(path string, c ControllerInterface, mappingMethods ...string) *App { |
| 137 | app.Handlers.Add(path, c) | 137 | app.Handlers.Add(path, c, mappingMethods...) |
| 138 | return app | 138 | return app |
| 139 | } | 139 | } |
| 140 | 140 | ||
| ... | @@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App { | ... | @@ -181,8 +181,8 @@ func RegisterController(path string, c ControllerInterface) *App { |
| 181 | return BeeApp | 181 | return BeeApp |
| 182 | } | 182 | } |
| 183 | 183 | ||
| 184 | func Router(rootpath string, c ControllerInterface) *App { | 184 | func Router(rootpath string, c ControllerInterface, mappingMethods ...string) *App { |
| 185 | BeeApp.Router(rootpath, c) | 185 | BeeApp.Router(rootpath, c, mappingMethods...) |
| 186 | return BeeApp | 186 | return BeeApp |
| 187 | } | 187 | } |
| 188 | 188 | ... | ... |
-
Please register or sign in to post a comment