registration returns token now
This commit is contained in:
parent
55e82425a9
commit
4bfc10d7de
5 changed files with 14 additions and 6 deletions
|
|
@ -19,6 +19,11 @@ public class UserService : IUserService
|
|||
return await _userRepository.GetUserByEmail(email) ?? throw new NotFoundException("Email not found");
|
||||
}
|
||||
|
||||
public async Task<bool> IsEmailTaken(string email)
|
||||
{
|
||||
return await _userRepository.GetUserByEmail(email) != null;
|
||||
}
|
||||
|
||||
public async Task CreateUserAsync(User user)
|
||||
{
|
||||
await _userRepository.AddAsync(user);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue