Skip to content

Commit

Permalink
Merge pull request #241 from aljachimiak/regression_for_include
Browse files Browse the repository at this point in the history
fixes missing include query handles in catalog item controller
  • Loading branch information
kixxauth authored Oct 25, 2016
2 parents c09cece + 697d005 commit 38bd871
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/middleware/response-json-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const JSON_API_KEYS = ['id', 'type', 'relationships', 'meta', 'links'];

// options.bus - Object *required*
// options.baseUrlPrefix - String ex: "/v2".
// options.allowPartialIncluded - Boolean (default == false)
// options.excludePortFromLinks - Boolean (default == false) If true, don't
// include the port number in links.
module.exports = function (options) {
Expand Down
4 changes: 4 additions & 0 deletions lib/services/catalog/controllers/catalog-item-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ class CatalogItemController extends Controller {
.then(channel => {
const args = {type, id};

if (req.query.include) {
args.include = req.query.include.split(',');
}

// When no platform ID is present in the JWT during an admin role request,
// the query for the resource is made directly to the store instead of through
// the catalog service.
Expand Down

0 comments on commit 38bd871

Please sign in to comment.