Initial commit
This commit is contained in:
parent
858c1bebd2
commit
5556ca85f4
2 changed files with 4 additions and 9 deletions
|
@ -23,5 +23,5 @@ public interface IUserService
|
|||
/// </summary>
|
||||
/// <param name="userId">User id.</param>
|
||||
/// <returns>Instance of <see cref="UserDto" />, or null if not found.</returns>
|
||||
Task<UserDto> FindById(string userId);
|
||||
Task<UserDto> FindById(Guid userId);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class UserService : IUserService
|
|||
/// <param name="createUserValidator">Instance of <see cref="CreateUserValidator" />.</param>
|
||||
/// <param name="registrationConfig">Instance of <see cref="IOptions{RegistrationOptions}" />.</param>
|
||||
/// <param name="transactionProvider">Instance of <see cref="ITransactionProvider" />.</param>
|
||||
/// <param name="transactionProvider">Instance of <see cref="ITransactionProvider" />.</param>
|
||||
/// <param name="userProfileRepository">Instance of <see cref="IUserProfileRepository" />.</param>
|
||||
/// <param name="logger">Instance of <see cref="ILogger" />.</param>
|
||||
public UserService(
|
||||
IUserRepository userRepository,
|
||||
|
@ -154,14 +154,9 @@ public class UserService : IUserService
|
|||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<UserDto> FindById(string userId)
|
||||
public async Task<UserDto> FindById(Guid userId)
|
||||
{
|
||||
if (!Guid.TryParse(userId, out var userGuid))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
var user = await _userRepository.FindByIdAsync(userGuid);
|
||||
var user = await _userRepository.FindByIdAsync(userId);
|
||||
|
||||
return _mapper.Map<UserDto>(user);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue