This website requires JavaScript.
Explore
Help
Sign In
archive
/
rsnext
Watch
1
Star
0
Fork
You've already forked rsnext
0
Code
Issues
Pull requests
Projects
Releases
Packages
Wiki
Activity
Actions
9cfc09e3ab
rsnext
/
test
/
integration
/
serverless
/
pages
/
api
/
posts
/
[id].js
4 lines
57 B
JavaScript
Raw
Normal View
History
Unescape
Escape
Fix dynamic APIs with query params (#8386) * Fix dynamic APIs with query params If you define a dynamic API such as ``` pages/ api/ [id].js ``` This api becomes available at `/api/[id]`. If you send a request with a query parameter the value of `req.query.id` will include the query string as well as the path parameter. E.g. the request to `/api/2?test=123` will result in `req.query` being ```javascript { id: "2?test=123", test: "123", } ``` instead of ```javascript { id: "2", test: "123", } ``` * Fix url parse in serverless loader * Add serverless test
2019-08-19 19:19:39 +02:00
export
default
(
{
query
}
,
res
)
=>
{
res
.
json
(
query
)
Add API tests to serverless (#7774) * Add failing API tests to serverless * Add newline * Fix failing serverless tests
2019-07-09 00:50:01 +02:00
}
Reference in a new issue
Copy permalink