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.
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.