* Fix for #1642 - copy query parameters to request body * Add missing request.query to pass test
This commit is contained in:
@@ -6,25 +6,27 @@ import rest from '../rest';
|
||||
|
||||
export class InstallationsRouter extends ClassesRouter {
|
||||
handleFind(req) {
|
||||
let body = Object.assign(req.body, ClassesRouter.JSONFromQuery(req.query));
|
||||
var options = {};
|
||||
if (req.body.skip) {
|
||||
options.skip = Number(req.body.skip);
|
||||
|
||||
if (body.skip) {
|
||||
options.skip = Number(body.skip);
|
||||
}
|
||||
if (req.body.limit) {
|
||||
options.limit = Number(req.body.limit);
|
||||
if (body.limit) {
|
||||
options.limit = Number(body.limit);
|
||||
}
|
||||
if (req.body.order) {
|
||||
options.order = String(req.body.order);
|
||||
if (body.order) {
|
||||
options.order = String(body.order);
|
||||
}
|
||||
if (req.body.count) {
|
||||
if (body.count) {
|
||||
options.count = true;
|
||||
}
|
||||
if (req.body.include) {
|
||||
options.include = String(req.body.include);
|
||||
if (body.include) {
|
||||
options.include = String(body.include);
|
||||
}
|
||||
|
||||
return rest.find(req.config, req.auth,
|
||||
'_Installation', req.body.where, options)
|
||||
'_Installation', body.where, options)
|
||||
.then((response) => {
|
||||
return {response: response};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user