@nakedcreativity/cee-ms-node 0.3.2 → 0.3.3
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/index.js +5 -5
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -105,8 +105,7 @@ function ceems(config) {
|
|
|
105
105
|
this.app.post(/draft\/(.*)/, (req, res)=>{
|
|
106
106
|
|
|
107
107
|
// validate authorisation JWT here
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
|
|
110
109
|
//console.log(req.body.page)
|
|
111
110
|
req.query.edit = true;
|
|
112
111
|
|
|
@@ -193,9 +192,10 @@ ceems.prototype.render = function(req, res, page=null) {
|
|
|
193
192
|
// to-do: we need to give module access to entire page object, and therefore the 'sitemap' and other site information
|
|
194
193
|
var scope = module.content
|
|
195
194
|
scope.page = page
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
195
|
+
if (this.site){
|
|
196
|
+
scope.site = this.site.site
|
|
197
|
+
scope.pages = this.site.pages
|
|
198
|
+
}
|
|
199
199
|
this.engine.parseAndRender(moduleTemplate, scope)
|
|
200
200
|
.then(function(html){
|
|
201
201
|
|