@tomei/sso 0.34.7 → 0.34.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -25,7 +25,7 @@ module.exports = {
25
25
  },
26
26
  FullName: {
27
27
  type: Sequelize.STRING(200),
28
- allowNull: false,
28
+ allowNull: true,
29
29
  },
30
30
  IdNo: {
31
31
  type: Sequelize.STRING(50),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomei/sso",
3
- "version": "0.34.7",
3
+ "version": "0.34.9",
4
4
  "description": "Tomei SSO Package",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -261,6 +261,7 @@ export class User extends UserBase {
261
261
  this.UserName = userInfo.FullName;
262
262
  this.FullName = userInfo.FullName;
263
263
  this.IDNo = userInfo.IDNo;
264
+ this.IDType = userInfo.IDType;
264
265
  this.Email = userInfo.Email;
265
266
  this.ContactNo = userInfo.ContactNo;
266
267
  this.Password = userInfo.Password;
@@ -1019,8 +1020,7 @@ export class User extends UserBase {
1019
1020
  }
1020
1021
  //If Params.IdNo is not null, then Params.IdType is required and vice versa.
1021
1022
  if (IdType && IdNo) {
1022
- where[Op.or]['IdType'] = IdType;
1023
- where[Op.or]['IdNo'] = IdNo;
1023
+ where[Op.and] = [{ IdType: IdType }, { IdNo: IdNo }];
1024
1024
  }
1025
1025
  if (ContactNo) {
1026
1026
  where[Op.or]['ContactNo'] = ContactNo;
@@ -1344,6 +1344,9 @@ export class User extends UserBase {
1344
1344
  {
1345
1345
  Email: userInfo.Email,
1346
1346
  UserName: userInfo.UserName,
1347
+ FullName: userInfo.FullName,
1348
+ IdNo: userInfo.IDNo,
1349
+ IdType: userInfo.IDType,
1347
1350
  Password: userInfo.Password,
1348
1351
  Status: userInfo.Status,
1349
1352
  DefaultPasswordChangedYN: userInfo.DefaultPasswordChangedYN,
@@ -53,25 +53,25 @@ export default class User extends Model {
53
53
  Password: string;
54
54
 
55
55
  @Column({
56
- allowNull: false,
56
+ allowNull: true,
57
57
  type: DataType.STRING,
58
58
  })
59
59
  FullName: string;
60
60
 
61
61
  @Column({
62
- allowNull: false,
62
+ allowNull: true,
63
63
  type: DataType.STRING,
64
64
  })
65
65
  IdNo: string;
66
66
 
67
67
  @Column({
68
- allowNull: false,
68
+ allowNull: true,
69
69
  type: DataType.STRING,
70
70
  })
71
71
  IdType: string;
72
72
 
73
73
  @Column({
74
- allowNull: false,
74
+ allowNull: true,
75
75
  type: DataType.STRING,
76
76
  })
77
77
  ContactNo: string;