Commit d6784b17 authored by Anton's avatar Anton

Update profiles to new client signature, update dependencies, update changelog

parent a172603d
......@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
- Find & get methods now accept a query parameter 'select' as a JSON encoded array specifiying fields to select for results
- Find methods now detect and parse regular expressions in JSON-encoded query parameter
- Allow setting ACL through URL query parameters
......@@ -16,6 +17,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Author middleware and base Service class now in [mbjs-generic-api](https://gitlab.rlp.net/motionbank/mbjs/generic-api)
- Author middleware now retrieves profile via external HTTP request
- Updated [mbjs-persistence](https://gitlab.rlp.net/motionbank/mbjs/persistence) to version 1.0.0
- Updated [mbjs-generic-api](https://gitlab.rlp.net/motionbank/mbjs/generic-api) to version 0.8.1
### Fixed
......
......@@ -163,9 +163,9 @@
}
},
"@types/express-unless": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.5.0.tgz",
"integrity": "sha512-JXk9zrVJLfLmpudQTyI//uMIMFEeKFmsOr67PtUDXVrCG9GEkTBqVFprGCGX/4oP7I/WlCPJ9RJjbyF2/Jzwqw==",
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.5.1.tgz",
"integrity": "sha512-5fuvg7C69lemNgl0+v+CUxDYWVPSfXHhJPst4yTLcqi4zKJpORCxnDrnnilk3k0DTq/WrAUdvXFs01+vUqUZHw==",
"requires": {
"@types/express": "*"
}
......@@ -176,9 +176,9 @@
"integrity": "sha512-FwI9gX75FgVBJ7ywgnq/P7tw+/o1GUbtP0KzbtusLigAOgIgNISRK0ZPl4qertvXSIE8YbsVJueQ90cDt9YYyw=="
},
"@types/node": {
"version": "11.9.0",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.0.tgz",
"integrity": "sha512-ry4DOrC+xenhQbzk1iIPzCZGhhPGEFv7ia7Iu6XXSLVluiJIe9FfG7Iu3mObH9mpxEXCWLCMU4JWbCCR9Oy1Zg=="
"version": "11.9.4",
"resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.4.tgz",
"integrity": "sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA=="
},
"@types/range-parser": {
"version": "1.2.3",
......@@ -373,11 +373,18 @@
"integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU="
},
"async": {
"version": "2.6.1",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz",
"integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==",
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz",
"integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==",
"requires": {
"lodash": "^4.17.10"
"lodash": "^4.17.11"
},
"dependencies": {
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
}
}
},
"asyncemit": {
......@@ -2224,9 +2231,9 @@
}
},
"mbjs-generic-api": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/mbjs-generic-api/-/mbjs-generic-api-0.6.0.tgz",
"integrity": "sha512-CDhR17gVgIty2yvrOGlbwg8EmM5Wgo6yAUdYL+ux90I7XD4TBYKUNDhpbt2IR9zZVvLSV87ALDXxedMdq54bEA==",
"version": "0.8.1",
"resolved": "https://registry.npmjs.org/mbjs-generic-api/-/mbjs-generic-api-0.8.1.tgz",
"integrity": "sha512-NhFWl9+z4aT72gJh8LBD7qAK/NWjFV69BXyNTfK9m0Fd0YqTgJL4NS22EGbFO4JHtKtUtEiyTiRjmixTzQ0xEA==",
"requires": {
"@polka/send-type": "^0.4.0",
"acl": "^0.4.11",
......@@ -2236,7 +2243,7 @@
"cors": "^2.8.4",
"express-jwt": "^5.3.1",
"jwks-rsa": "^1.3.0",
"mbjs-persistence": "^0.2.0",
"mbjs-persistence": "1.0.0",
"mbjs-utils": "0.0.5",
"memcached": "^2.2.2",
"mongodb": "^3.1.1",
......@@ -2266,9 +2273,9 @@
}
},
"mbjs-persistence": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/mbjs-persistence/-/mbjs-persistence-0.2.0.tgz",
"integrity": "sha512-KTZvxdCK+S3PAlA+XZtLxjM1jPJeOEV6WJE8c0TDJ7cbp96xL5Pz2zTfw/kyMp1k24m+ThZF9BI/c5Qij9EQUA==",
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/mbjs-persistence/-/mbjs-persistence-1.0.0.tgz",
"integrity": "sha512-Z+bmR8mCODYzbh5K6L2sAOBmwl/e1va/jeN5inhTmtVb4IrH0fe0l3jnRHnQRpXNJc9X+XLgorXH5pmb+kckHQ==",
"requires": {
"mbjs-utils": "0.0.5"
},
......
......@@ -40,7 +40,7 @@ class Profiles extends TinyEmitter {
const data = req.body
let results
try {
results = await this.client.find({ user: req.params.id }, req.params)
results = await this.client.find({ user: req.params.id })
}
catch (err) {
api.captureException(err)
......@@ -48,7 +48,7 @@ class Profiles extends TinyEmitter {
}
if (results.length) {
data.uuid = results[0].uuid
results = await this.client.update(data.uuid, data, req.params)
results = await this.client.update(data.uuid, data)
return _this._response(req, res, results)
}
send(res, 404)
......@@ -57,7 +57,7 @@ class Profiles extends TinyEmitter {
api.app.patch('/profiles/:id', async (req, res) => {
let results
try {
results = await this.client.find({user: req.params.id}, req.params)
results = await this.client.find({user: req.params.id})
}
catch (err) {
api.captureException(err)
......@@ -73,7 +73,7 @@ class Profiles extends TinyEmitter {
if (results.length) {
results = ObjectUtil.merge(results[0], copy)
try {
await this.client.update(results.uuid, results, req.params)
await this.client.update(results.uuid, results)
}
catch (err) {
api.captureException(err)
......@@ -87,7 +87,7 @@ class Profiles extends TinyEmitter {
api.app.delete('/profiles/:id', async (req, res) => {
let results
try {
results = await this.client.find({user: req.params.id}, req.params)
results = await this.client.find({user: req.params.id})
}
catch (err) {
api.captureException(err)
......@@ -95,7 +95,7 @@ class Profiles extends TinyEmitter {
}
if (results.length) {
try {
results = await this.client.remove(results[0].uuid, req.params)
results = await this.client.remove(results[0].uuid)
}
catch (err) {
api.captureException(err)
......@@ -112,7 +112,7 @@ class Profiles extends TinyEmitter {
async getHandler (req, res) {
let results
try {
results = await this._client.find({user: req.params.id}, req.params)
results = await this._client.find({user: req.params.id})
}
catch (err) {
this._api.captureException(err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment