import { createMiddleware } from "hono/factory"; export const userAuth = createMiddleware(async (c, next) => { const userToken = c.req.header("Authorization"); if (!userToken) { return c.json({ error: "Unauthorized" }, 401); } if (userToken !== process.env.USER_TOKEN) { return c.json({ error: "Unauthorized" }, 401); } await next(); });