json-object-editor 0.10.438 → 0.10.439

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/CHANGELOG.md CHANGED
@@ -1,6 +1,7 @@
1
1
  ## CHANGELOG
2
2
 
3
3
  ### 0.10.400
4
+ 439 - Enhanced route handling in Sites.js to support paths with and without leading slashes.
4
5
  438 - enhance get function with itemtype parameter, and improve notifier functionality
5
6
  437 - tagsList optimized using cache
6
7
  436 - tags listRender
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "json-object-editor",
3
- "version": "0.10.438",
3
+ "version": "0.10.439",
4
4
  "description": "JOE the Json Object Editor | Platform Edition",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -36,6 +36,7 @@
36
36
  "cookie-parser": "^1.4.1",
37
37
  "craydent": "^0.8.9",
38
38
  "express": "^4.16.4",
39
+ "googleapis": "^149.0.0",
39
40
  "got": "^12.6.0",
40
41
  "jwt-decode": "^2.2.0",
41
42
  "mailgun": "^0.5.0",
@@ -43,6 +44,7 @@
43
44
  "mysql": "^2.16.0",
44
45
  "nodemailer": "^2.7.2",
45
46
  "nodemailer-ses-transport": "^1.4.0",
47
+ "openai": "^5.0.1",
46
48
  "opener": "^1.4.3",
47
49
  "pem": "^1.13.2",
48
50
  "plaid": "^13.1.0",
@@ -372,8 +372,10 @@ logit('\n\r'+modulename+new Date()+' siteurl: '+siteurl+' site: '+(site && site.
372
372
  datasets[ds] = JOE.Data[ds];
373
373
  });
374
374
 
375
-
376
- var page = JOE.Data.page.where({$and:[{site:site._id},{path:route}]})[0]
375
+ var route = payload.siteRoute || '';
376
+ var routeWithSlash = route.startsWith('/') ? route : '/' + route;
377
+ var routeWithoutSlash = route.startsWith('/') ? route.slice(1) : route;
378
+ var page = JOE.Data.page.where({$and:[{site:site._id},{path:{$in:[routeWithSlash,routeWithoutSlash]}}]})[0]
377
379
  || findDynamicPage(payload.originalURL,site,req);
378
380
 
379
381
  if(!page){