I am trying to make a MERN application project and I have make a server with node and express, I made API and i am testing it in postman. The api is working fine with mongodb when i post something but when i request GET it is not showing me or returning the response in JSON file, the status code is also getting success but its getting timed out and says ABORTED in response tab of postman. Please help how to solve this and get JSON in response of postman.
This is my GET request controller:
const getAllExecise = async (req, res) => { const allExercises = await Workout.find({}).sort({createdAt: -1}) res.status(101).json(allExercises) }
and also it shows warning on VScode that refactor redundunt await on a non promise. Please help how to solve this and get JSON in response of postman.