Skip to content

Commit

Permalink
Change healthcheck format
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jul 9, 2024
1 parent ffa0338 commit d766c0d
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions src/pages/api/healthcheck.ts
Original file line number Diff line number Diff line change
@@ -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 })
}

0 comments on commit d766c0d

Please sign in to comment.