From c08365c5a2ea6e3cb5bd9b7206059c4a807308a3 Mon Sep 17 00:00:00 2001 From: TinsFox Date: Fri, 1 Nov 2024 11:41:15 +0800 Subject: [PATCH] fix --- src/middleware/auth-middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/auth-middleware.ts b/src/middleware/auth-middleware.ts index da55e1b..f6ac70c 100644 --- a/src/middleware/auth-middleware.ts +++ b/src/middleware/auth-middleware.ts @@ -4,7 +4,7 @@ import { Context, Next } from "hono" const authWhiteList = ["/api/auth/login", "/api/auth/register", "/api/seed"] export const authMiddleware = (c: Context, next: Next) => { - if (authWhiteList.includes(c.req.path)) { + if (authWhiteList?.includes(c.req.path)) { return next() } const jwtMiddleware = jwt({