Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

Fix API views handle function to return early when method is not POST

Ilias Ismanalijevdc5533598fb1
diff --git a/pages/api/views.ts b/pages/api/views.ts
index 0e3efd01..117f37e3 100644
--- a/pages/api/views.ts
+++ b/pages/api/views.ts
@@ -10,8 +10,6 @@ export default async function handle(
req: NextApiRequest,
res: NextApiResponse,
) {
- res.status(200).json({ message: "OK" });
- return
// We only allow POST requests
if (req.method !== "POST") {
res.status(405).json({ message: "Method Not Allowed" });