Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

Fix

Marc Klingen101b625112b2
diff --git a/src/pages/api/public/generations.ts b/src/pages/api/public/generations.ts
index f232463c31..b5ea7c8d34 100644
--- a/src/pages/api/public/generations.ts
+++ b/src/pages/api/public/generations.ts
@@ -67,10 +67,6 @@ export default async function handler(
) {
await runMiddleware(req, res, cors);
- if (req.method !== "POST") {
- return res.status(405).json({ message: "Method not allowed" });
- }
-
// CHECK AUTH
const authCheck = await verifyAuthHeaderAndReturnScope(
req.headers.authorization
@@ -253,5 +249,7 @@ export default async function handler(
error: errorMessage,
});
}
+ } else {
+ return res.status(405).json({ message: "Method not allowed" });
}
}