Last active
August 29, 2022 14:30
-
-
Save KolbySisk/4bf8b8e0e11346a54905734e9cb2f3a4 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 { use } from 'next-api-route-middleware'; | |
const handler = async (req: NextApiRequest, res: NextApiResponse<{ message: string }>) => { | |
return res.status(200).json({ message: 'request was good!' }); | |
}; | |
export default use(validateBody(formSchema), handler); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment