eh-commons 0.0.2-testing.78 → 0.0.2-testing.79

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "eh-commons",
3
3
  "type": "commonjs",
4
- "version": "0.0.2-testing.78",
4
+ "version": "0.0.2-testing.79",
5
5
  "description": "eh-commons",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -109,5 +109,14 @@ export class SessionV2Service {
109
109
  }
110
110
  return userSessionToken;
111
111
  }
112
+
113
+ public async readUserClient(userId: string, clientId: string): Promise<ISessionClientData> {
114
+ const key = generateUserClientPermissionKeyword(userId, clientId);
115
+ const response = await this._redisService.get(key);
116
+ if (!response) {
117
+ throw new RESTError('user_client_not_found', clientId, 400);
118
+ }
119
+ return JSON.parse(response);
120
+ }
112
121
  //#endregion
113
122
  }