fix: use HttpMiddlewareFunc
This commit is contained in:
parent
2cc600b78b
commit
6402410d75
|
@ -37,7 +37,7 @@ func ApplyMiddlewares(handler jape.Handler, middlewares ...interface{}) jape.Han
|
||||||
case JapeMiddlewareFunc:
|
case JapeMiddlewareFunc:
|
||||||
mid := middlewares[i].(JapeMiddlewareFunc)
|
mid := middlewares[i].(JapeMiddlewareFunc)
|
||||||
handler = mid(handler)
|
handler = mid(handler)
|
||||||
case func(next http.Handler) http.Handler:
|
case HttpMiddlewareFunc:
|
||||||
mid := middlewares[i].(HttpMiddlewareFunc)
|
mid := middlewares[i].(HttpMiddlewareFunc)
|
||||||
handler = AdaptMiddleware(mid)(handler)
|
handler = AdaptMiddleware(mid)(handler)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue