Please help with stock price checker

We currently can’t see the code.

But it looks like you are talking about this challenge.

What happened to your question about the stock price checker?
Did you resolve the issues you were having here?

'use strict';

const fetch = require('node-fetch');

// our inner DB

const stocksDB = [];

async function getStock(stock) {
  const fetchResponse = await fetch(
    `https://repeated-aplace.glitch.me/v1/stock/${stock}/quote`
  );
  const { symbol, latestPrice } = await fetchResponse.json();

  return {
    symbol,
    price: `${latestPrice}`,
  };
}

async function addToStocksDB(stock, like) {
  const returnedStock = await getStock(stock);
  const { symbol, price } = returnedStock;

  if (symbol) {
    if (symbolsDB.hasOwnProperty(symbol)) {
      symbolsDB[symbol] = {
        price,
        like: like ? symbolsDB[symbol].like + 1 : symbolsDB[symbol].like,
      };
    } else {
      symbolsDB[symbol] = {
        price,
        like: like ? 1 : 0,
      };
    }
  }
}

module.exports = function (app) {
  app.route('/api/stock-prices').get(async function (req, res) {
    const { stock, like } = req.query;

    const stockKeys = [];

    if (stock) {
      if (typeof stock === 'string') {
        await addToStocksDB(stock, like);

        stockKeys.push(stock.toUpperCase());
      } else {
        // is an array
        for (let i = 0; i < stock.length; i++) {
          await addToStocksDB(stock[i], like);

          stockKeys.push(stock[i].toUpperCase());
        }
      }
    }

    const result =
      stockKeys.length === 1
        ? { ...stocksDB[stockKeys[0]], stock: stockKeys[0] }
        : object
            .keys(stocksDB)
            .filter((key) => stockKeys.includes(key))
            .map((key) => ({
              stock: key,
              ...stocksDB[key],
            }));

    res.json({
      stockData: result,
    });
  });
};

//{"stockData":{"stock":"GOOG","price":"786.90","likes":1}}
//{"stockData":[{"stock":"MSFT","price":"62.30","rel_likes":-1},{"stock":"GOOG","price":"786.90","rel_likes":1}]}

If so, then you need to let us know and we can mark this as resolved.

If you are talking about the set up mongoose challenge then you should reply back to that topic here.

But mixing two different challenges in the same topic makes things very confusing.
make sense?