@labdigital/commercetools-mock 2.21.1 → 2.21.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7067,12 +7067,21 @@ var AbstractService = class {
7067
7067
  get(request, response) {
7068
7068
  const limit = this._parseParam(request.query.limit);
7069
7069
  const offset = this._parseParam(request.query.offset);
7070
- const result = this.repository.query(getRepositoryContext(request), {
7070
+ const params = {
7071
7071
  expand: this._parseParam(request.query.expand),
7072
7072
  where: this._parseParam(request.query.where),
7073
7073
  limit: limit !== void 0 ? Number(limit) : void 0,
7074
7074
  offset: offset !== void 0 ? Number(offset) : void 0
7075
- });
7075
+ };
7076
+ for (const key in request.query) {
7077
+ if (key.startsWith("var.")) {
7078
+ const items = this._parseParam(request.query[key]);
7079
+ if (items) {
7080
+ params[key] = items.length === 1 ? items[0] : items;
7081
+ }
7082
+ }
7083
+ }
7084
+ const result = this.repository.query(getRepositoryContext(request), params);
7076
7085
  return response.status(200).send(result);
7077
7086
  }
7078
7087
  getWithId(request, response) {