Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

queryStringParameters object structure differs from deployment environment #54

Closed
Neo-Oli opened this issue Aug 28, 2018 · 2 comments
Closed

Comments

@Neo-Oli
Copy link

Neo-Oli commented Aug 28, 2018

We have a request that looks something like this:

?filter[0][field]=title&filter[0][value]=TestElement&filter[1][field]=category&filter[1][value]=CategoryName

And in the development environment's lambda function the event.queryStringParameters, will be a nested object/array construct like this:

{
    "filter": [
        {
            "field": "title",
            "value": "TestElement"
        },
        {
            "field": "category",
            "value": "CategoryName"
        }
    ]
}

But in our deployment environment it will be a flat object like this:

{
    "filter[0][field]" : "title",
    "filter[0][value]" : "TestElement",
    "filter[1][field]" : "category",
    "filter[1][value]" : "CategoryName"
}

It should be the same in both environments.

@swyxio
Copy link
Contributor

swyxio commented Oct 17, 2018

verified. cc @fool .

@swyxio swyxio added the bug label Oct 17, 2018
8eecf0d2 added a commit to 8eecf0d2/netlify-lambda that referenced this issue Oct 17, 2018
swyxio added a commit that referenced this issue Oct 17, 2018
fixed querystring parsing #54
@fool
Copy link
Contributor

fool commented Oct 19, 2018

does your fix close this issue @sw-yx ? if so I'd close this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants