1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +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:
Gerasimos (Makis) Maropoulos
2019-07-11 15:07:39 +03:00
parent 33dfb42d73
commit f8d19b3ed2
3 changed files with 73 additions and 22 deletions

View File

@@ -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) {