Closed craigmulligan closed 6 years ago
cc @Exulansis
Does this mean that the current version of the agile-data container currently does not work at all? I am struggling trying to get it work these days - using the agile-sdk...
Hey @kdo-sw 👋 it means that passing a query fails, so GET /api/record?<query>
won't work but GET /api/record
should work fine.
If this is not the issue you are hitting then please open another issue with some details and I'll look into it! 🙏
Out of my experience, what @craig-mulligan mentioned is correct, the data retrieval does work (at least in the agile UI), the query is not taken into consideration (if I am not mistaken, the entire dataset is returned regardless of the query).
You can now pass https://www.npmjs.com/package/mongo-querystring as query parameters.
eg /api/record?deviceID=mydevice
Available from v0.0.12
.
Currently we are just passing the URL query straight to mongo
.find
which obviously doesn't work, so we could use a parsing lib.Couple to choose from: https://www.npmjs.com/package/mongo-querystring https://www.npmjs.com/package/query-to-mongo