forms-angular 0.12.0-beta.281 → 0.12.0-beta.283

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.
@@ -740,7 +740,7 @@ class FormsAngular {
740
740
  function processInternalObject(obj) {
741
741
  return Object.keys(obj).reduce((acc, cur) => {
742
742
  const curType = typeof obj[cur];
743
- if (!['$', '_'].includes(cur.charAt(0)) && curType !== 'function') {
743
+ if ((!['$', '_'].includes(cur.charAt(0)) || ["$in", "$nin", "$eq", "$ne", "$gt", "$gte", "$lt", "$lte", "$regex", "$or", "$exists"].includes(cur)) && curType !== 'function') {
744
744
  const val = obj[cur];
745
745
  if (val) {
746
746
  if (Array.isArray(val)) {
@@ -868,7 +868,12 @@ class FormsAngular {
868
868
  }
869
869
  let reportSchema;
870
870
  if (req.params.reportName) {
871
- reportSchema = await req.resource.model.schema.statics['report'](req.params.reportName, req);
871
+ try {
872
+ reportSchema = await req.resource.model.schema.statics['report'](req.params.reportName, req);
873
+ }
874
+ catch (e) {
875
+ res.send({ success: false, error: e.message || e });
876
+ }
872
877
  }
873
878
  else if (req.query.r) {
874
879
  switch (req.query.r[0]) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Mark Chapman <support@forms-angular.org>",
4
4
  "description": "A form builder that sits on top of Angular.js, Twitter Bootstrap, jQuery UI, Angular-UI, Express and Mongoose. Opinionated or what?",
5
5
  "homepage": "http://forms-angular.org",
6
- "version": "0.12.0-beta.281",
6
+ "version": "0.12.0-beta.283",
7
7
  "engines": {
8
8
  "node": ">=8.x",
9
9
  "npm": ">=5.x"