Очистка
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Knot.Contracts.Auth.Domain;
|
||||
using Knot.Modules.Auth.Domain;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Knot.Modules.Auth.Infrastructure.Persistence;
|
||||
|
||||
@@ -63,13 +63,7 @@ internal sealed class UserRepository : IUserRepository
|
||||
var domainUser = await _context.Users.FirstOrDefaultAsync(u => u.Id == user.Id, cancellationToken);
|
||||
if (domainUser != null)
|
||||
{
|
||||
domainUser.Username = user.Username;
|
||||
domainUser.DisplayName = user.DisplayName;
|
||||
domainUser.PhoneNumber = user.PhoneNumber;
|
||||
domainUser.IsBanned = user.IsBanned;
|
||||
domainUser.BannedUntil = user.BannedUntil;
|
||||
domainUser.IsOnline = user.IsOnline;
|
||||
domainUser.UserDomain = user.Domain;
|
||||
domainUser.UpdateFromContract(user);
|
||||
_context.Users.Update(domainUser);
|
||||
}
|
||||
}
|
||||
@@ -109,13 +103,7 @@ internal sealed class UserRepository : IUserRepository
|
||||
var domainUser = _context.Users.Find(user.Id);
|
||||
if (domainUser != null)
|
||||
{
|
||||
domainUser.Username = user.Username;
|
||||
domainUser.DisplayName = user.DisplayName;
|
||||
domainUser.PhoneNumber = user.PhoneNumber;
|
||||
domainUser.IsBanned = user.IsBanned;
|
||||
domainUser.BannedUntil = user.BannedUntil;
|
||||
domainUser.IsOnline = user.IsOnline;
|
||||
domainUser.UserDomain = user.Domain;
|
||||
domainUser.UpdateFromContract(user);
|
||||
_context.Users.Update(domainUser);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user