From 9949dae5e82e6308f89d5ef5845701c593fb7a0b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 17 Feb 2024 05:28:56 -0500 Subject: [PATCH] fix: add HttpMiddlewareFunc to switch case --- api/middleware/middleware.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/middleware/middleware.go b/api/middleware/middleware.go index ae18394..e0d702f 100644 --- a/api/middleware/middleware.go +++ b/api/middleware/middleware.go @@ -51,7 +51,7 @@ func ApplyMiddlewares(handler jape.Handler, middlewares ...interface{}) jape.Han case JapeMiddlewareFunc: mid := middlewares[i].(JapeMiddlewareFunc) handler = mid(handler) - case func(http.Handler) http.Handler: + case func(http.Handler) http.Handler, HttpMiddlewareFunc: mid := middlewares[i].(func(http.Handler) http.Handler) handler = AdaptMiddleware(mid)(handler)