rez_core 1.0.71 → 1.0.72

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,6 +1,6 @@
1
1
  {
2
2
  "name": "rez_core",
3
- "version": "1.0.71",
3
+ "version": "1.0.72",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -5,14 +5,12 @@ import { UserSessionService } from './user-session.service';
5
5
  import { UserService } from './user.service';
6
6
  import { ConfigService } from '@nestjs/config';
7
7
 
8
-
9
-
10
8
  @Injectable()
11
9
  export class LoginService {
12
10
  constructor(
13
11
  @Inject('UserService') private readonly userService: UserService,
14
12
  private userSessionService: UserSessionService,
15
- private configService: ConfigService
13
+ private configService: ConfigService,
16
14
  ) {}
17
15
 
18
16
  masterKey: string = this.configService.get('MASTER_KEY') || '';
@@ -28,7 +26,7 @@ export class LoginService {
28
26
  };
29
27
  }
30
28
 
31
- if (user.status !=="ACTIVE"){
29
+ if (user.status !== 'ACTIVE') {
32
30
  return {
33
31
  success: false,
34
32
  message: 'Your account is inactive.',
@@ -52,16 +50,19 @@ export class LoginService {
52
50
 
53
51
  const token = await this.userSessionService.createSession(user);
54
52
 
55
- if(user.is_firstlogin === 1) {
53
+ if (user.is_firstlogin === 1) {
56
54
  user.invitation_status = 'ACCEPTED';
57
55
  user.is_firstlogin = 0;
58
- await this.userService.updateEntity(user,user);
59
- }
60
56
 
61
- return{
62
- success:true,
63
- accessToken:token
57
+ const { password, ...userWithoutPassword } = user;
58
+
59
+ await this.userService.updateEntity(userWithoutPassword, user);
64
60
  }
61
+
62
+ return {
63
+ success: true,
64
+ accessToken: token,
65
+ };
65
66
  }
66
67
 
67
68
  async loginWithGoogle(email: string, name) {