Skip to content

Instantly share code, notes, and snippets.

@KolbySisk
Created August 26, 2022 18:14
Show Gist options
  • Save KolbySisk/693ebde4f13cd0c0febf026e1a432b21 to your computer and use it in GitHub Desktop.
Save KolbySisk/693ebde4f13cd0c0febf026e1a432b21 to your computer and use it in GitHub Desktop.
import type { NextApiRequest, NextApiResponse } from 'next';
type User = { userId: string };
const handler = (req: NextApiRequest, res: NextApiResponse<User>) => {
return res.status(200).json({ userId: 'abc123' });
};
export default handler;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment