add "me" endpoint
This commit is contained in:
parent
98b38f645f
commit
ae1a8d2b97
7 changed files with 49 additions and 10 deletions
|
|
@ -19,6 +19,11 @@ public class UserService : IUserService
|
|||
return await _userRepository.GetUserByEmail(email) ?? throw new NotFoundException("Email not found");
|
||||
}
|
||||
|
||||
public async Task<User> GetUserById(int id)
|
||||
{
|
||||
return await _userRepository.GetByIdAsync(id) ?? throw new NotFoundException("User not found");
|
||||
}
|
||||
|
||||
public async Task<bool> IsEmailTaken(string email)
|
||||
{
|
||||
return await _userRepository.GetUserByEmail(email) != null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue