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

Aws lambda preset miss the multiValueQueryStringParameters object #396

Closed
huang-julien opened this issue Aug 8, 2022 · 1 comment · Fixed by #398
Closed

Aws lambda preset miss the multiValueQueryStringParameters object #396

huang-julien opened this issue Aug 8, 2022 · 1 comment · Fixed by #398

Comments

@huang-julien
Copy link
Contributor

Environment

nitro: 0.4
node: 16

nitro config

export default defineNitroConfig({
})

Reproduction

server/api/index.ts

export default defineEventhandler((event) => {

  const test = {test: 'foo', query: useQuery(event)}

  return test
})
  • use the aws-lambda preset
  • send a request using /api?test=hello&test=world
  • The query object received when using useQuery() return
{ test: "world" }

instead of ["hello","world"]

Describe the bug

aws doc
looks like the multiValueQueryStringParameters has not been parsed and sent to nitro.

https://github.com/unjs/nitro/blob/9c2f6ca7f5a85b3f922a1af6dedee25f298ba1f2/src/runtime/entries/aws-lambda.ts#L11

Additional context

No response

Logs

No response

@huang-julien
Copy link
Contributor Author

Is there any workaround while the PR is pending ?

@pi0 pi0 closed this as completed in #398 Aug 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant