@tomei/sso 0.28.3 → 0.28.4
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
|
@@ -296,6 +296,7 @@ export class LoginUser extends LoginUserBase {
|
|
|
296
296
|
model: Staff,
|
|
297
297
|
},
|
|
298
298
|
],
|
|
299
|
+
transaction: dbTransaction,
|
|
299
300
|
});
|
|
300
301
|
|
|
301
302
|
if (!user) {
|
|
@@ -583,14 +584,16 @@ export class LoginUser extends LoginUserBase {
|
|
|
583
584
|
|
|
584
585
|
return `${this.UserId}:${sessionId}`;
|
|
585
586
|
} catch (error) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
587
|
+
if (this.ObjectId) {
|
|
588
|
+
await LoginUser._LoginHistoryRepository.create({
|
|
589
|
+
UserId: this.UserId,
|
|
590
|
+
SystemCode: systemCode,
|
|
591
|
+
OriginIp: ipAddress,
|
|
592
|
+
LoginStatus: LoginStatusEnum.FAILURE,
|
|
593
|
+
CreatedAt: new Date(),
|
|
594
|
+
dbTransaction,
|
|
595
|
+
});
|
|
596
|
+
}
|
|
594
597
|
throw error;
|
|
595
598
|
}
|
|
596
599
|
}
|