@fraym/auth 0.7.0 → 0.7.1

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.
@@ -11,7 +11,7 @@ const createNewUser = async (tenantId, login, email, displayName, password, assi
11
11
  password,
12
12
  active,
13
13
  assignedRoleIds,
14
- blockedUntil: blockedUntil.getTime(),
14
+ blockedUntil: blockedUntil.getTime().toString(),
15
15
  }, (error, response) => {
16
16
  if (error) {
17
17
  reject(error.message);
@@ -10,7 +10,20 @@ const getAllUsers = async (tenantId, serviceClient) => {
10
10
  reject(error.message);
11
11
  return;
12
12
  }
13
- resolve(response.users);
13
+ resolve(response.users.map(user => {
14
+ const newUser = {
15
+ active: user.active,
16
+ assignedRoleIds: user.assignedRoleIds,
17
+ blockedUntil: parseInt(user.blockedUntil),
18
+ displayName: user.displayName,
19
+ email: user.email,
20
+ failedAttempts: parseInt(user.failedAttempts),
21
+ id: user.id,
22
+ lastAttempt: parseInt(user.lastAttempt),
23
+ login: user.login,
24
+ };
25
+ return newUser;
26
+ }));
14
27
  });
15
28
  });
16
29
  };
@@ -12,7 +12,7 @@ const updateExistingUser = async (tenantId, id, login, email, displayName, passw
12
12
  password,
13
13
  active,
14
14
  assignedRoleIds,
15
- blockedUntil: blockedUntil.getTime(),
15
+ blockedUntil: blockedUntil.getTime().toString(),
16
16
  }, error => {
17
17
  if (error) {
18
18
  reject(error.message);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fraym/auth",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "license": "MIT",
5
5
  "homepage": "https://github.com/fraym/auth-nodejs",
6
6
  "repository": {
@@ -27,7 +27,7 @@
27
27
  "main": "dist/index.js",
28
28
  "types": "dist/index.d.ts",
29
29
  "dependencies": {
30
- "@fraym/proto": "^0.2.0",
30
+ "@fraym/proto": "^0.5.4",
31
31
  "@graphql-tools/graphql-file-loader": "^7.5.17",
32
32
  "@graphql-tools/load": "^7.8.14",
33
33
  "@grpc/grpc-js": "^1.9.3",