Validate login request and refactor login handling

This commit is contained in:
Holden
2026-06-19 14:58:02 -05:00
parent 63730dbba0
commit 076fed09f2
10 changed files with 32 additions and 7 deletions

View File

@@ -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);