mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-07-09 03:04:19 -04:00
Small cleanup on Account service.
This commit is contained in:
parent
13ed323949
commit
67b97b3be2
@ -60,7 +60,7 @@ namespace API.Controllers
|
||||
[HttpPost("login")]
|
||||
public async Task<ActionResult<UserDto>> Login(LoginDto loginDto)
|
||||
{
|
||||
var user = await _context.Users.SingleOrDefaultAsync(x => x.UserName == loginDto.Username.ToLower());
|
||||
var user = await _userRepository.GetUserByUsernameAsync(loginDto.Username);
|
||||
|
||||
if (user == null) return Unauthorized("Invalid username");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user