@riocrypto/common-server 1.0.2591 → 1.0.2592

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.
@@ -3,14 +3,14 @@ declare global {
3
3
  namespace Express {
4
4
  interface Request {
5
5
  adminContext?: {
6
- adminId: string;
7
- adminEmail: string;
8
- adminName: string;
6
+ adminAuthId: string;
7
+ adminAuthEmail: string;
8
+ adminAuthName: string;
9
9
  };
10
10
  userContext?: {
11
- userId: string;
12
- phoneNumber: string;
13
- userName: string;
11
+ authId: string;
12
+ authPhoneNumber: string;
13
+ authName: string;
14
14
  };
15
15
  }
16
16
  }
@@ -34,9 +34,9 @@ const authContextMiddleware = (req, res, next) => __awaiter(void 0, void 0, void
34
34
  const adminAuth = yield AdminAuth.findById(decoded.id);
35
35
  if (adminAuth) {
36
36
  req.adminContext = {
37
- adminId: decoded.id,
38
- adminEmail: decoded.email,
39
- adminName: (0, common_1.getAuthName)(adminAuth.toJSON()),
37
+ adminAuthId: decoded.id,
38
+ adminAuthEmail: decoded.email,
39
+ adminAuthName: (0, common_1.getAuthName)(adminAuth.toJSON()),
40
40
  };
41
41
  }
42
42
  }
@@ -54,9 +54,9 @@ const authContextMiddleware = (req, res, next) => __awaiter(void 0, void 0, void
54
54
  const auth = yield Auth.findById(decoded.id);
55
55
  if (auth) {
56
56
  req.userContext = {
57
- userId: decoded.id,
58
- phoneNumber: decoded.phoneNumber,
59
- userName: (0, common_1.getAuthName)(auth.toJSON()),
57
+ authId: decoded.id,
58
+ authPhoneNumber: decoded.phoneNumber,
59
+ authName: (0, common_1.getAuthName)(auth.toJSON()),
60
60
  };
61
61
  }
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2591",
3
+ "version": "1.0.2592",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",