mirror of
https://github.com/kataras/iris.git
synced 2026-01-09 13:05:56 +00:00
add 'Context.Register/RemoveDependency' for registering dependencies for next handler in the chain from a common iris handler in serve-time
And also, add a Configuration.FireEmptyFormError if end-dev wants to receive an iris.ErrEmptyForm error on missing form data on 'Context.ReadForm/ReadBody' Former-commit-id: a2713bec77375b2908f1f066a46be4f19e6b7a61
This commit is contained in:
@@ -164,6 +164,7 @@
|
||||
* [Middleware](dependency-injection/basic/middleware/main.go)
|
||||
* [Sessions](dependency-injection/sessions/main.go)
|
||||
* [Smart Contract](dependency-injection/smart-contract/main.go)
|
||||
* [JWT](dependency-injection/jwt/main.go)
|
||||
* MVC
|
||||
* [Overview - Repository and Service layers](mvc/overview)
|
||||
* [Login - Repository and Service layers](mvc/login)
|
||||
|
||||
@@ -37,10 +37,13 @@ func register(api *iris.APIContainer) {
|
||||
// ctx.StopWithStatus(iris.StatusUnauthorized)
|
||||
// return nil
|
||||
// }
|
||||
|
||||
//
|
||||
// token := j.Get(ctx)
|
||||
// return token
|
||||
// })
|
||||
// ^ You can do the same with MVC too, as the container is shared and works
|
||||
// the same way in both functions-as-handlers and structs-as-controllers.
|
||||
//
|
||||
// api.Get("/", verifiedWithBindedTokenPage)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user