mirror of
https://github.com/kataras/iris.git
synced 2025-12-18 02:17:05 +00:00
add HandleMany to controller's Before/AfterActivation feature as requested at: https://github.com/kataras/iris/issues/1292
Former-commit-id: c021f49522a214ddc3978a1c8f5e8d32f029eb2d
This commit is contained in:
@@ -36,6 +36,7 @@ func basicMVC(app *mvc.Application) {
|
||||
|
||||
// GET: http://localhost:8080/basic
|
||||
// GET: http://localhost:8080/basic/custom
|
||||
// GET: http://localhost:8080/basic/custom2
|
||||
app.Handle(new(basicController))
|
||||
|
||||
// All dependencies of the parent *mvc.Application
|
||||
@@ -73,7 +74,7 @@ type basicController struct {
|
||||
}
|
||||
|
||||
func (c *basicController) BeforeActivation(b mvc.BeforeActivation) {
|
||||
b.Handle("GET", "/custom", "Custom")
|
||||
b.HandleMany("GET", "/custom /custom2", "Custom")
|
||||
}
|
||||
|
||||
func (c *basicController) AfterActivation(a mvc.AfterActivation) {
|
||||
|
||||
Reference in New Issue
Block a user