Validate login request and refactor login handling
This commit is contained in:
@@ -68,10 +68,7 @@ public class ProfileService(
|
||||
if (profile.IsBanned)
|
||||
return LoginProfileResult.Fail("Profile is banned");
|
||||
|
||||
if (auth.Name is not null && profile.Name != auth.Name)
|
||||
profile.SetName(auth.Name);
|
||||
|
||||
profile.AddDeviceId(command.DeviceId);
|
||||
profile.RecordSuccessfulLogin(command.DeviceId, auth.Name);
|
||||
|
||||
await profileRepository.SaveChangesAsync(ct);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user