Information Security Projects - Stock Price Checker

Tell us what’s happening:

Hi can any one help me width this please

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

Information Security Projects - Stock Price Checker

Tanks :smile:

Can you say more about how you’re stuck?

Yes im stuck in the next:

  • Failed:You should set the content security policies to only allow loading of scripts and CSS from your server.

  • Failed:You can send a GET request to /api/stock-prices, passing a NASDAQ stock symbol to a stock query parameter. The returned object will contain a property named stockData.

  • Failed:The stockData property includes the stock symbol as a string, the price as a number, and likes as a number.

Failed:If you pass along 2 stocks, the returned value will be an array with information about both stocks. Instead of likes, it will display rel_likes (the difference between the likes on both stocks) for both stockData objects.

I have been looking in other topics and i dont know what to do

What have you tried as debugging so far?

Sory what do you mean

The tests say 3 things are wrong. What have you done so far to try to figure out why those tests are failing?

You have Mongoose code in the api.js file but you are not requiring it in and you are using models that do not exist. Nor can I find an actual DB connection.

I have try:
Reading other peple forrums and trying to put their code in my, but it dosen’t function
to me.

I have tried telling my techer and it also didn’t work.

Hi wath do you mean with Nor

It is the same as “neither”. I’m saying I can’t find where you are connecting to the DB in the code.

You should not be at this part of the curriculum without knowing how to use MongoDB/Mongoose.

If you are just copying people’s code without understanding it you won’t learn anything.

Ok i will stop replying in this post till i find where is my problem at the mongoose sorry for everything and taks for all :face_in_clouds:

You are free to ask as many questions as you like that is what we are here for.

But when we see code that is incomplete and it is caused by copy/pasting code we can’t just fix it for you as that would be a disservice to your learning.

Do you understand what is missing in the code?

yes i need to requier the mongongo but i wont be able to tell very well because i don’t know mongoose

I don’t know why you are trying to do this certificate project. It is not the right time for you.

You must finish the MongoDB Mongoose part of the curriculum first. I would also suggest you finish all the other certificate projects that come before this part of the curriculum. This project is deep into the backend part of the curriculum and you should have a firm grasp on the concepts needed.

yes tanks and happy coding

your totaly right

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.