From 9f398580008ca3c7434d52630059c7db6cc4b30b Mon Sep 17 00:00:00 2001 From: Marek Czernek <mczernek@redhat.com> Date: Wed, 11 Mar 2020 15:03:47 +0100 Subject: [PATCH] Remove mock calls --- mczernek-exchange-application/history/index.js | 29 ----------------------------- 1 files changed, 0 insertions(+), 29 deletions(-) diff --git a/mczernek-exchange-application/history/index.js b/mczernek-exchange-application/history/index.js index 81845fe..ba0c09d 100644 --- a/mczernek-exchange-application/history/index.js +++ b/mczernek-exchange-application/history/index.js @@ -42,37 +42,8 @@ res.json(dataWithDate).status(200); } -/* MOCK for other microservice */ -const getData = (req, res) => { - const currencies = ["EUR", "USD"] - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Access-Control-Allow-Origin', '*'); - res.json(currencies).status(200); -}; - - -/* MOCK for other microservice - */ -const getCurrencyData = (req, resp) => { - const currency = req.params.currency; - var res = {value: ""} - if(currency === "EUR") { - res.value = 1.11 - res.srcSign = "���" - res.targetSign = "$" - } else { - res.value = 0.9 - res.srcSign = "$" - res.targetSign = "���" - } - resp.json(res).status(200); -} - app.post('/', postData); -app.get('/', getData); -app.get('/:currency', getCurrencyData) - app.listen(_const.PORT, () => { console.log( -- Gitblit v1.9.3