rez_core 1.0.70 → 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.70",
3
+ "version": "1.0.72",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "private": false,
@@ -114,7 +114,6 @@ export class MasterService {
114
114
 
115
115
  for (const attribute of attributes) {
116
116
  if (attribute.data_source_type === 'entity') {
117
- console.log(attribute.data_source_type);
118
117
  let entityMaster = await this.entityMasterService.getEntityData(
119
118
  attribute.datasource_list,
120
119
  );
@@ -14,7 +14,6 @@ export class EntityTableRepository {
14
14
  const temp = await this.entityTableRepository.findOne({
15
15
  where: { mapped_entity_type: entityType, list_type: listType },
16
16
  });
17
- console.log(temp)
18
17
  return temp;
19
18
  }
20
19
 
@@ -42,7 +42,6 @@ export class MediaDataService extends EntityServiceImpl {
42
42
 
43
43
  const id = uuidv4();
44
44
  const s3Key = `uploads/${id}.${ext}`;
45
- console.log(s3Key);
46
45
 
47
46
  const uploadUrl = await this.s3.getSignedUrlPromise('putObject', {
48
47
  Bucket: this.bucketName,
@@ -53,4 +53,6 @@ export class CreateUserDto extends BaseEntity {
53
53
  is_firstlogin: number;
54
54
 
55
55
  invitation_status: string;
56
+ is_defaultadmin: number;
57
+ is_customer: number;
56
58
  }
@@ -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) {