API microservices Url shortner

I cannot get matched value from mongoose


Your browser information:

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

Challenge: URL Shortener Microservice

Link to the challenge:

It seems like you’re using callback version of mongoose, so you should put your if...else statement inside curly braces (on the same level as if(err)) and use data instead of check.

1 Like

Thanks , By the way i was wondering what is the return type of Model.find()