Skip to content

Instantly share code, notes, and snippets.

@Jerga99
Created June 23, 2021 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jerga99/64e228ce8a210b5388a2699ff81015b0 to your computer and use it in GitHub Desktop.
Save Jerga99/64e228ce8a210b5388a2699ff81015b0 to your computer and use it in GitHub Desktop.
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