make healthcheck public in cfapi
This commit is contained in:
parent
3f0cf01772
commit
592b8bebb4
2 changed files with 2 additions and 3 deletions
|
|
@ -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",
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue