Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Commit

Permalink
update query guide
Browse files Browse the repository at this point in the history
  • Loading branch information
nahtnam committed Jun 2, 2019
1 parent 22c4166 commit 955b426
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guides/query.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ If there are multiple query parameters with the same name, it will return an arr

## Usage

Simply import the `query` function and pass it the `req` object.
Simply import the `query` function and pass it the url of the request.

```javascript
const { light, query } = require('light');
Expand All @@ -20,7 +20,7 @@ module.exports = light({
path: '/',

async handler(req) {
const { id, name } = await query(req);
const { id, name } = await query(req.url);

return {
id,
Expand Down

0 comments on commit 955b426

Please sign in to comment.