mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
Replace controller's .Register with .Handle and AddDependencies with .Register in order to be aligned with the 'hero' package, all examples and docs are updated, it's crazy how I can't stop even on Christmas
Former-commit-id: 3b42963e9806e327ee42942cf156bda6059eaf8f
This commit is contained in:
@@ -2,7 +2,6 @@ package main
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris"
|
||||
|
||||
"github.com/kataras/iris/hero"
|
||||
)
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ func main() {
|
||||
movieService := services.NewMovieService(repo)
|
||||
hero.Register(movieService)
|
||||
|
||||
// Register our routes with hero handlers.
|
||||
// Serve our routes with hero handlers.
|
||||
app.PartyFunc("/hello", func(r iris.Party) {
|
||||
r.Get("/", hero.Handler(routes.Hello))
|
||||
r.Get("/{name}", hero.Handler(routes.HelloName))
|
||||
|
||||
Reference in New Issue
Block a user