1import type { Context, Next } from "hono";
2
3const secretMiddleware = async (c: Context, next: Next) => {
4 const code = c.req.query("code");
5
6 if (code !== process.env.SHARED_SECRET) {
7 return c.body("Unauthorized", 401);
8 }
9
10 return next();
11};
12
13export default secretMiddleware;