expressa 2.0.17 → 2.0.19

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.
@@ -14,12 +14,14 @@ async function validateDocumentOwner(req, doc) {
14
14
  if (!doc.meta.owner_collection) {
15
15
  throw new util.ApiError(417, 'no owner_collection for owner found')
16
16
  }
17
+ util.validateSchemaProperty(req.params.collection, 'meta.owner_collection', doc.meta.owner_collection)
17
18
  if (!(doc._id === doc.meta.owner && req.params.collection === doc.meta.owner_collection)) {
18
19
  const count = await req.db[doc.meta.owner_collection].count({ _id: doc.meta.owner }, undefined, 1)
19
20
  if (!count) {
20
21
  throw new util.ApiError(417, 'invalid owner')
21
22
  }
22
23
  }
24
+ util.validateSchemaProperty(doc.meta.owner_collection, 'meta.owner', doc.meta.owner)
23
25
  }
24
26
 
25
27
  async function setDocumentOwner(req, doc) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expressa",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "API framework using JSON schemas",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/thomas4019/expressa",
@@ -14,7 +14,7 @@
14
14
  "debug": "^2.6.1",
15
15
  "dot-object": "^2.1.4",
16
16
  "express": "^4.17.1",
17
- "jfs": "^0.3.0",
17
+ "jfs": "^0.2.6",
18
18
  "jsonwebtoken": "^9.0.0",
19
19
  "mongo-query": "^0.5.7",
20
20
  "mongo-query-to-postgres-jsonb": "^0.2.17",
@@ -29,11 +29,11 @@
29
29
  "devDependencies": {
30
30
  "chai": "^4.2.0",
31
31
  "cross-env": "^7.0.2",
32
- "cypress": "^9.2.0",
32
+ "cypress": "^15.3.0",
33
33
  "eslint": "^7.1.0",
34
- "mocha": "^9.1.3",
34
+ "mocha": "^11.7.2",
35
35
  "mocha-junit-reporter": "^2.0.2",
36
- "nodemon": "^2.0.4",
36
+ "nodemon": "^3.1.10",
37
37
  "rimraf": "^3.0.2",
38
38
  "supertest": "^3.4.2"
39
39
  },