Skip to content

Commit c3b96b5

Browse files
Region support
1 parent 8c7a5cb commit c3b96b5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

examples/node/contentstack-demo.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ const Contentstack = require('../../dist/node/contentstack.js');
1010

1111
class ContentstackDemo {
1212
constructor(config) {
13-
config = config || { 'api_key': 'blt123something', 'access_token': 'blt123something', 'environment': 'development' }
13+
config = config || { 'api_key': 'blt123something', 'access_token': 'blt123something', 'environment': 'development', }
1414
// Initialize the Contentstackstack
15+
//console.log("datattatata", Contentstack.Region.EUROPE)
16+
1517
this.Stack = Contentstack.Stack(config);
1618
}
1719

@@ -24,7 +26,8 @@ class ContentstackDemo {
2426
*/
2527
getEntries(contentTypeUid) {
2628
contentTypeUid = contentTypeUid || 'source'
27-
return this.Stack.ContentType("source").Query().includeSchema().IncludeReferenceContentTypeUID().find()
29+
return this.Stack.ContentType(contentTypeUid).Query().toJSON().find()
30+
2831
}
2932

3033
/**
@@ -45,8 +48,8 @@ class ContentstackDemo {
4548
* @return : Result {Promise}
4649
*/
4750
getContentTypedemo() {
48-
//contentTypeUid = contentTypeUid || 'source'
49-
return this.Stack.ContentType('conference').fetch()
51+
contentTypeUid = contentTypeUid || 'source'
52+
return this.Stack.ContentType(contentTypeUid).fetch()
5053
// return this.Stack.ContentType('event_list').Entry('blt5d40c608567844d4').toJSON().fetch()
5154
}
5255

0 commit comments

Comments
 (0)