Skip to content

Commit a29e3c6

Browse files
Removed unused instance class variants
1 parent 5cca2f6 commit a29e3c6

File tree

4 files changed

+19
-408
lines changed

4 files changed

+19
-408
lines changed

src/core/modules/entry.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -388,11 +388,9 @@ export default class Entry {
388388
* @returns {Variants}
389389
* @instance
390390
*/
391-
Variants(uid) {
392-
let variant_entry = new Variants(uid);
393-
if (uid && typeof uid === "string") {
394-
variant_entry.variant_entry_uid = uid;
395-
}
396-
return Utils.merge(variant_entry, this);
397-
}
391+
Variants(variant_headers) {
392+
this.headers['x-cs-variant-uid'] = variant_headers;
393+
return this;
394+
}
395+
398396
}

src/core/modules/query.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,4 +829,18 @@ export default class Query extends Entry {
829829
return Utils.sendRequest(Utils.mergeDeep({}, this), options);
830830
}
831831

832+
/**
833+
* @method Variants
834+
* @memberOf Query
835+
* @param {String} uid - uid of the variants entry
836+
* @description An initializer is responsible for creating Variants Entry object
837+
* @returns {Variants}
838+
* @instance
839+
*/
840+
Variants(variant_headers) {
841+
this.headers['x-cs-variant-uid'] = variant_headers;
842+
return this;
843+
}
844+
845+
832846
}

0 commit comments

Comments
 (0)