Unverified Commit 61ca7369 authored by Nikola Knežević's avatar Nikola Knežević Committed by GitHub

Fix function syntax for API Routes documentation (#31414)

There is a non-valid mix of classic and arrow function notation in the documentation. I've fixed it to be a classical function notation because all the other examples are like that.

## Documentation / Examples

- [ ] Make sure the linting passes by running `yarn lint`
parent 4223611a
...@@ -89,7 +89,7 @@ type ResponseData { ...@@ -89,7 +89,7 @@ type ResponseData {
message: string message: string
} }
export default function handler(req: NextApiRequest, res: NextApiResponse<ResponseData>) => { export default function handler(req: NextApiRequest, res: NextApiResponse<ResponseData>) {
res.status(200).json({ message: 'Hello from Next.js!' }) res.status(200).json({ message: 'Hello from Next.js!' })
} }
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment