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({