fixed crash if user exists but has no account
This commit is contained in:
parent
1c0bce5c4e
commit
ce405a3e36
1 changed files with 4 additions and 1 deletions
|
@ -164,7 +164,10 @@ namespace Lieb.Controllers
|
||||||
{
|
{
|
||||||
AccountName = user.AccountName
|
AccountName = user.AccountName
|
||||||
};
|
};
|
||||||
|
if(_userService.GetLiebUserGW2AccountOnly(user.UserId) == null)
|
||||||
|
{
|
||||||
await _userService.CreateUser(user.UserId, user.UserName);
|
await _userService.CreateUser(user.UserId, user.UserName);
|
||||||
|
}
|
||||||
await _gw2AccountService.AddOrEditAccount(gw2Account, user.UserId);
|
await _gw2AccountService.AddOrEditAccount(gw2Account, user.UserId);
|
||||||
return Ok();
|
return Ok();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue