Created
June 23, 2021 07:14
-
-
Save Jerga99/64e228ce8a210b5388a2699ff81015b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Car from '../../../models/Carb' | |
import connectDb from '../../../utils/connectDb'; | |
export default async (req, res) => { | |
await connectDb(); | |
const { id } = req.query | |
const car = await Car.findById(id); | |
res.status(200).json(car); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment