From 65bc43594ef97513250cfad1c6788bfee0430c29 Mon Sep 17 00:00:00 2001 From: JeremiahUy Date: Tue, 13 Oct 2020 10:01:40 +0200 Subject: [PATCH] REFACTOR: test if variable can be passed down --- src/server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server.js b/src/server.js index 6836f13..e108f10 100644 --- a/src/server.js +++ b/src/server.js @@ -19,6 +19,7 @@ module.exports = async () => { global.isAliveStatus = true global.errorKafkaConsumer = "Error: " + global.isReadyStatus = false ingressException.forEach(data => ingresses.set(data.ingress, data)) @@ -45,9 +46,8 @@ module.exports = async () => { fastify.route(require('./routes/its-ready')); fastify.route(require('./routes/libs')); fastify.route(require('./routes/your-ip')); - - const collectTest = require('./routes/collect-test'); - fastify.route(collectTest(ingresses)) + + fastify.route(require('./routes/collect-test')(ingresses)) fastify.get(paths.SCHEMAS, (request, reply) => { reply.send(fastify.getSchemas()) }) return fastify;