We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f23b24 commit ed8d6e2Copy full SHA for ed8d6e2
test/e2e/api-resolver-query-writeable/pages/api/index.js
@@ -1,12 +1,4 @@
1
export default (req, res) => {
2
- if (
3
- process.env.CUSTOM_SERVER &&
4
- typeof req.fromCustomServer === 'undefined'
5
- ) {
6
- throw new Error('missing custom req field')
7
- }
8
-
9
- if (req.method === 'POST') {
10
- res.status(200).json(req.body)
11
+ req.query = { ...req.query, changed: 'yes' }
+ res.status(200).json({ query: req.query })
12
}
0 commit comments