fixed cars_make

This commit is contained in:
Jonathan Jara 2025-05-03 19:57:53 -07:00
parent 6c29105cb0
commit f477877e91

View File

@ -30,7 +30,7 @@ exports.getModelsByMake = async (req, res) => {
return res.status(400).json({ message: "Missing `make` parameter" });
}
const models = await Car.distinct("model", { make });
const models = await CarModel.distinct("model", { make });
if (models.length === 0) {
return res.status(404).json({ message: "No models found for this make" });