diff --git a/package.json b/package.json index 4601043ca4..23970ff1ff 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "@iconify/tailwind": "0.1.4", "@innei/eslint-config-react-ts": "0.12.2", "@innei/prettier": "0.12.2", - "@mx-space/webhook": "0.2.2", + "@mx-space/webhook": "0.2.4", "@next/bundle-analyzer": "14.1.0", "@tailwindcss/container-queries": "0.1.1", "@tailwindcss/typography": "0.5.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 289b1560dc..db4a7ccf60 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -287,8 +287,8 @@ devDependencies: specifier: 0.12.2 version: 0.12.2 '@mx-space/webhook': - specifier: 0.2.2 - version: 0.2.2 + specifier: 0.2.4 + version: 0.2.4 '@next/bundle-analyzer': specifier: 14.1.0 version: 14.1.0 @@ -2567,8 +2567,8 @@ packages: resolution: {integrity: sha512-WsPLbXbQsV6Ji8+aR6F2JOtKxLwGLftT0mzQXvaL/G6c62PfiCQK7cVayI6XWogv/cq1ll6qrRcKPo412HEwSQ==} dev: false - /@mx-space/webhook@0.2.2: - resolution: {integrity: sha512-f73DVF38ISm6NzfuAyO9buB4EUHQ3AL8gbEhkBdddQFlCbf4MlVpPLHwo/k7Za87feSQPhEuYow/MOp2BaSmGA==} + /@mx-space/webhook@0.2.4: + resolution: {integrity: sha512-tPe/Jef2DHJZQBh1kdGr9lrKh75qw9In7FJXY5piNZz9z90AIlR53o/eUelrSkKpBWxiqwXHDbCEw7SjLWOXdA==} dev: true /@neondatabase/serverless@0.7.2: diff --git a/src/app/api/webhook/route.ts b/src/app/api/webhook/route.ts index 690091a618..ae87766f59 100644 --- a/src/app/api/webhook/route.ts +++ b/src/app/api/webhook/route.ts @@ -32,7 +32,7 @@ export const POST = async (nextreq: NextRequest) => { }) switch (type) { - case 'health-check': { + case 'health_check': { return res.status(200).send('OK') } case BusinessEvents.NOTE_CREATE: @@ -56,6 +56,10 @@ export const POST = async (nextreq: NextRequest) => { await Promise.all([invalidateCache(CacheKeyMap.AggregateTop)]) return res.status(200).send('OK') } + + default: { + return res.status(200).send('MISS') + } } } catch (err) { if (err instanceof InvalidSignatureError) {