Skip to content

Commit 35a763d

Browse files
Region support
1 parent f825d8f commit 35a763d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
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

examples/node/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict'
22

33
const ContentstackDemo = require('./contentstack-demo.js')
4-
54
const Demo = new ContentstackDemo({ 'api_key': "", 'access_token': "", 'environment': ""})
65

76

0 commit comments

Comments
 (0)