Skip to content

Commit c646e19

Browse files
Support the Include snippet schema feature
1 parent b7896f7 commit c646e19

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/core/lib/request.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,11 @@ export default function Request(options) {
4242
queryParams = serialize(options.body);
4343
}
4444

45-
4645
fetch(url + '?' + queryParams, {
4746
method: 'GET',
4847
headers: headers
4948
})
50-
.then(function(response) {
49+
.then(function(response) {
5150
if (response.ok && response.status === 200) {
5251
let data = response.json();
5352
resolve(data);

src/core/modules/entry.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ export default class Entry {
190190
*/
191191
includeSchema() {
192192
this._query['include_schema'] = true;
193+
this._query['include_snippet_schema'] = true;
193194
return this;
194195
}
195196

@@ -226,6 +227,7 @@ export default class Entry {
226227
*/
227228
includeContentType() {
228229
this._query['include_content_type'] = true;
230+
this._query['include_snippet_schema'] = true;
229231
return this;
230232
}
231233

src/core/modules/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ export default class Query extends Entry {
652652
query: this._query
653653
}
654654
};
655-
return Utils.sendRequest(this);
655+
return Utils.sendRequest(this);
656656
}
657657

658658
/**

0 commit comments

Comments
 (0)