From d766c0d7aa90b75d115db325990b17760f28cc20 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Tue, 9 Jul 2024 19:19:58 +0700 Subject: [PATCH] Change healthcheck format --- src/pages/api/healthcheck.ts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/pages/api/healthcheck.ts b/src/pages/api/healthcheck.ts index 75a631adc..eccbc5ea0 100644 --- a/src/pages/api/healthcheck.ts +++ b/src/pages/api/healthcheck.ts @@ -1,13 +1,5 @@ -import { handlerWrapper } from '@/server/common' -import { z } from 'zod' +import { NextApiRequest, NextApiResponse } from 'next' -export default handlerWrapper({ - inputSchema: z.any(), - dataGetter: (req) => req.query, -})({ - errorLabel: 'healthcheck', - allowedMethods: ['GET'], - handler: async (_, __, res) => { - res.json({ message: 'OK', success: true }) - }, -}) +export default function handler(_: NextApiRequest, res: NextApiResponse) { + res.json({ operational: true }) +}