From 7350fcb4ef5cdbeafb61a8d0b167f6fc3d208ec1 Mon Sep 17 00:00:00 2001 From: Rory Powell Date: Thu, 24 Mar 2022 14:24:56 +0000 Subject: [PATCH] Fix test --- packages/server/src/api/index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/index.js b/packages/server/src/api/index.js index 39a7fd6cb7..dac23e32c8 100644 --- a/packages/server/src/api/index.js +++ b/packages/server/src/api/index.js @@ -13,6 +13,9 @@ const env = require("../environment") const router = new Router() +router.get("/health", ctx => (ctx.status = 200)) +router.get("/version", ctx => (ctx.body = pkg.version)) + router .use( compress({ @@ -33,8 +36,6 @@ router } await next() }) - .use("/health", ctx => (ctx.status = 200)) - .use("/version", ctx => (ctx.body = pkg.version)) // re-direct before any middlewares occur .redirect("/", "/builder") .use( @@ -71,8 +72,6 @@ router.use(async (ctx, next) => { } }) -router.get("/health", ctx => (ctx.status = 200)) - // authenticated routes for (let route of mainRoutes) { router.use(route.routes())