Skip to content

query param number values from client request turn into strings in req.query #2565

@mgenev

Description

@mgenev

I'm not sure if this is due to the nature of http or something express is doing, but I am passing numbers as values to my express api and when I try to obtain them with req.query.x they are typeof string. This is causing me to do extra manual work on the server as my db is expecting numbers. If numbers remained type number, I could just pass them to my db outright through my blueprint and not have to do a custom controller.

Please advise.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions