Skip to content

Commit 0209e0c

Browse files
authored
Prettier
1 parent 5c99344 commit 0209e0c

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

docs/03-pages/01-building-your-application/01-routing/07-api-routes.mdx

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ The following example sends a JSON response with the status code `200` (`OK`) an
217217
```ts filename="pages/api/hello.ts" switcher
218218
import type { NextApiRequest, NextApiResponse } from 'next'
219219

220-
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
220+
export default async function handler(
221+
req: NextApiRequest,
222+
res: NextApiResponse
223+
) {
221224
try {
222225
const result = await someAsyncOperation()
223226
res.status(200).json({ result })
@@ -247,7 +250,10 @@ The following example sends a HTTP response with the status code `200` (`OK`) an
247250
```ts filename="pages/api/hello.ts" switcher
248251
import type { NextApiRequest, NextApiResponse } from 'next'
249252

250-
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
253+
export default async function handler(
254+
req: NextApiRequest,
255+
res: NextApiResponse
256+
) {
251257
try {
252258
const result = await someAsyncOperation()
253259
res.status(200).send({ result })
@@ -277,7 +283,10 @@ The following example redirects the client to the `/` path if the form is succes
277283
```ts filename="pages/api/hello.ts" switcher
278284
import type { NextApiRequest, NextApiResponse } from 'next'
279285

280-
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
286+
export default async function handler(
287+
req: NextApiRequest,
288+
res: NextApiResponse
289+
) {
281290
const { name, message } = req.body
282291

283292
try {

0 commit comments

Comments
 (0)