async function getValue()

in middleware/controllers/transactions.js [66:84]


async function getValue(req,res){
    const { key } = req.params
    const baseUrl = `${getEnv("CPP_TRANSACTIONS_API_BASE_URL")}/${key}`
    const data = req.body
    let config = {
        method: 'get',
        maxBodyLength: Infinity,
        url: baseUrl,
      };
      try {
        let response = await axios.request(config) 
        return res.send(response?.data)
      } catch (error) {
        logger.error(error)
        return res.status(500).send({
            error: error
        })
      }
}