fix: null id when first created
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 27s
Build, Package and Push Images / sbom-scan (push) Successful in 38s
Build, Package and Push Images / container-build (push) Successful in 1m35s
Build, Package and Push Images / sonarqube (push) Successful in 1m39s
Build, Package and Push Images / container-sbom-scan (push) Successful in 36s
All checks were successful
Build, Package and Push Images / preprocess (push) Successful in 2s
Build, Package and Push Images / build (push) Successful in 27s
Build, Package and Push Images / sbom-scan (push) Successful in 38s
Build, Package and Push Images / container-build (push) Successful in 1m35s
Build, Package and Push Images / sonarqube (push) Successful in 1m39s
Build, Package and Push Images / container-sbom-scan (push) Successful in 36s
This commit is contained in:
parent
bd25ff9f09
commit
9bd75cd6c4
1 changed files with 3 additions and 4 deletions
|
@ -33,15 +33,14 @@ public class LoginHandler : IPacketHandler<LoginInfoPacket>
|
||||||
{
|
{
|
||||||
LoginResponseReason loginResponseReason;
|
LoginResponseReason loginResponseReason;
|
||||||
_logger.LoginData(packet.Username, packet.Password);
|
_logger.LoginData(packet.Username, packet.Password);
|
||||||
var account = await _wonderkingContext.Accounts.FirstOrDefaultAsync(a => a.Username == packet.Username)
|
var account = await _wonderkingContext.Accounts.FirstOrDefaultAsync(a => a.Username == packet.Username);
|
||||||
;
|
|
||||||
|
|
||||||
if (account == null)
|
if (account == null)
|
||||||
{
|
{
|
||||||
if (_configuration.GetSection("Testing").GetValue<bool>("CreateAccountOnLogin"))
|
if (_configuration.GetSection("Testing").GetValue<bool>("CreateAccountOnLogin"))
|
||||||
{
|
{
|
||||||
loginResponseReason = await CreateAccountOnLoginAsync(packet.Username, packet.Password)
|
loginResponseReason = await CreateAccountOnLoginAsync(packet.Username, packet.Password);
|
||||||
;
|
account = await _wonderkingContext.Accounts.FirstOrDefaultAsync(a => a.Username == packet.Username);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue