mirror of
https://github.com/kataras/iris.git
synced 2025-12-21 11:57:02 +00:00
add int8, int16, int32, uint, uint16 and uint32 default-builtn parameter types and macros - no doc update - no live tests yet - time for sleep
Former-commit-id: 4a27265a9f1368c4bbecd852691155e56c875673
This commit is contained in:
@@ -83,7 +83,6 @@ func convertTmplToHandler(tmpl *macro.Template) context.Handler {
|
||||
return func(tmpl macro.Template) context.Handler {
|
||||
return func(ctx context.Context) {
|
||||
for _, p := range tmpl.Params {
|
||||
paramValue := ctx.Params().Get(p.Name)
|
||||
if p.TypeEvaluator == nil {
|
||||
// allow.
|
||||
ctx.Next()
|
||||
@@ -91,7 +90,7 @@ func convertTmplToHandler(tmpl *macro.Template) context.Handler {
|
||||
}
|
||||
|
||||
// first, check for type evaluator.
|
||||
newValue, passed := p.TypeEvaluator(paramValue)
|
||||
newValue, passed := p.TypeEvaluator(ctx.Parms().Get(p.Name))
|
||||
if !passed {
|
||||
ctx.StatusCode(p.ErrCode)
|
||||
ctx.StopExecution()
|
||||
|
||||
Reference in New Issue
Block a user