BTCPay-infrastructure-recovery

This commit is contained in:
sysadmin
2025-09-04 21:28:47 +01:00
parent b4cee007c4
commit be4d797c6c
22 changed files with 1552 additions and 101 deletions

View File

@@ -103,6 +103,21 @@ public class AuthService : IAuthService
};
}
public async Task<UserDto?> GetUserByUsernameAsync(string username)
{
var user = await _context.Users
.FirstOrDefaultAsync(u => u.Username == username && u.IsActive);
if (user == null) return null;
return new UserDto
{
Id = user.Id,
Username = user.Username,
CreatedAt = user.CreatedAt,
IsActive = user.IsActive
};
}
public async Task<IEnumerable<UserDto>> GetAllUsersAsync()
{
return await _context.Users