make healthcheck public in cfapi

This commit is contained in:
ali 2026-03-29 09:09:48 +02:00
parent 3f0cf01772
commit 592b8bebb4
No known key found for this signature in database
GPG key ID: 44F9B42770617B9B
2 changed files with 2 additions and 3 deletions

View file

@ -14,9 +14,9 @@ export const GITHUB_WEBHOOK_PATH = "/cfapi/github"
export const ROUTES = {
// Root
ROOT: "/",
HEALTHCHECK: "/healthcheck",
// Public API (no auth)
HEALTHCHECK: "/healthcheck",
TEST_SENTRY: "/test-sentry",
SLACK_EVENTS: "/slack-events",

View file

@ -12,8 +12,6 @@ rootRoutes.get(ROUTES.ROOT, (req, res) => {
return res.status(200).send("OK")
})
rootRoutes.get(ROUTES.HEALTHCHECK, healthcheck)
// Public API routes (mounted under API_BASE_ROUTE)
// Using addAsync to properly handle async route handlers and pass errors to Express error middleware
const publicApiRouter = addAsync(Router()) as any
@ -21,3 +19,4 @@ export const publicApiRoutes = publicApiRouter
publicApiRouter.get(ROUTES.TEST_SENTRY, testSentry)
publicApiRouter.postAsync(ROUTES.SLACK_EVENTS, handleSlackEvents)
publicApiRouter.get(ROUTES.HEALTHCHECK, healthcheck)