We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 76db2ea commit 768183cCopy full SHA for 768183c
docs/02-pages/02-building-your-application/03-data-fetching/03-forms-and-mutations.mdx
@@ -34,8 +34,10 @@ export default async function handler(
34
```js filename="pages/api/submit.js" switcher
35
export default function handler(req, res) {
36
const data = req.body
37
- const id = await createItem(data)
38
- res.status(200).json({ id })
+ // call your database, etc.
+ // const id = await createItem(data)
39
+ // ...
40
+ res.status(200).json({ data })
41
}
42
```
43
0 commit comments