Skip to content

Commit

Permalink
Fix function syntax for API Routes documentation (#31414)
Browse files Browse the repository at this point in the history
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`
  • Loading branch information
knezevicdev committed Nov 15, 2021
1 parent 4223611 commit 61ca736
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/api-routes/response-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ type ResponseData {
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!' })
}
```
Expand Down

0 comments on commit 61ca736

Please sign in to comment.