@steedos/service-api 2.1.50 → 2.1.54
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 +1 -5
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -201,8 +201,6 @@ module.exports = {
|
|
|
201
201
|
* Check the token value & resolve the user by the token.
|
|
202
202
|
* The resolved user will be available in `ctx.meta.user`
|
|
203
203
|
*
|
|
204
|
-
* PLEASE NOTE, IT'S JUST AN EXAMPLE IMPLEMENTATION. DO NOT USE IN PRODUCTION!
|
|
205
|
-
*
|
|
206
204
|
* @param {Context} ctx
|
|
207
205
|
* @param {Object} route
|
|
208
206
|
* @param {IncomingRequest} req
|
|
@@ -220,8 +218,6 @@ module.exports = {
|
|
|
220
218
|
/**
|
|
221
219
|
* Authorize the request. Check that the authenticated user has right to access the resource.
|
|
222
220
|
*
|
|
223
|
-
* PLEASE NOTE, IT'S JUST AN EXAMPLE IMPLEMENTATION. DO NOT USE IN PRODUCTION!
|
|
224
|
-
*
|
|
225
221
|
* @param {Context} ctx
|
|
226
222
|
* @param {Object} route
|
|
227
223
|
* @param {IncomingRequest} req
|
|
@@ -232,7 +228,7 @@ module.exports = {
|
|
|
232
228
|
const user = ctx.meta.user;
|
|
233
229
|
|
|
234
230
|
if (!user) {
|
|
235
|
-
|
|
231
|
+
return res.status(401).send('NO_RIGHTS');
|
|
236
232
|
}
|
|
237
233
|
|
|
238
234
|
// // It check the `auth` property in action schema.
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.54",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@steedos/auth": "2.1.
|
|
7
|
+
"@steedos/auth": "2.1.54",
|
|
8
8
|
"graphql-type-json": "^0.3.2",
|
|
9
9
|
"moleculer-apollo-server": "^0.3.3",
|
|
10
10
|
"moleculer-web": "^0.9.1"
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "6b261ebf1924b3ec2dc9d1951ad3e0449de9fdef"
|
|
17
17
|
}
|