From ee51fb8997906c32e7bb314b9382df549757654c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=A2=E3=83=AC=E3=82=AF=E3=82=B5=E3=83=B3=E3=83=80?= =?UTF-8?q?=E3=83=BC=2Eeth?= Date: Wed, 13 Dec 2023 15:54:01 +0900 Subject: [PATCH] refactor: remove unnecessary code --- .netlify/functions/webhooks/webhooks.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.netlify/functions/webhooks/webhooks.ts b/.netlify/functions/webhooks/webhooks.ts index 0753cde90..1252be00b 100755 --- a/.netlify/functions/webhooks/webhooks.ts +++ b/.netlify/functions/webhooks/webhooks.ts @@ -3,7 +3,7 @@ import { Context, createProbot } from "probot"; import app from "../../../src/main"; const probot = createProbot(); const loadingApp = probot.load(app); -export async function handler(event, context: Context) { +export async function handler(event, _context: Context) { try { await loadingApp; await probot.webhooks.verifyAndReceive({ @@ -12,9 +12,9 @@ export async function handler(event, context: Context) { signature: event.headers["X-Hub-Signature-256"] || event.headers["x-hub-signature-256"] || "", payload: JSON.parse(event.body), }); - return { statusCode: 200, body: '{"ok":true}' }; + return { statusCode: 200 }; // Success response } catch (error) { console.error(error); - return { statusCode: error.status || 500, error: "ooops" }; + return { statusCode: error.status || 500 }; // Error response } }