I'm working on a project with composite ids for data entries. In order to query a particular record using JSON Server, I need to write a rewrite like this:
const rewrites = {
'/records/:idpartone-:idparttwo/': '/records/?id.partone=:idpartone&id.parttwo=:idparttwo'
};
The rewriter correctly rewrites the url, however the new query params are not parsed. The end result is that a request to /records/:idpartone-:idparttwo/ will return the full set of /records/.
I'm working on a project with composite ids for data entries. In order to query a particular record using JSON Server, I need to write a rewrite like this:
The rewriter correctly rewrites the url, however the new query params are not parsed. The end result is that a request to
/records/:idpartone-:idparttwo/will return the full set of/records/.