RefreshControllerTests

This commit is contained in:
Artemy
2025-07-21 18:05:30 +07:00
parent 10b4e5207f
commit 1fc13000b1
3 changed files with 126 additions and 8 deletions
@@ -46,11 +46,11 @@ public class AuthController : Controller
_logger.LogInformation($"Register request for {user.Username} with id {user.Id} processed successfully");
var token = await _userSession.OpenSessionAsync(user, registrationRequest.DeviceInfo);
var tokens = await _userSession.OpenSessionAsync(user, registrationRequest.DeviceInfo);
_logger.LogInformation($"Session for user {user.Username} with id {user.Id} has been opened");
return Ok(token);
return Ok(tokens);
}
catch (UserAlreadyExistException ex)
{
@@ -86,11 +86,11 @@ public class AuthController : Controller
var user = await _accountService.LoginAsync(loginRequest.Name, loginRequest.Password);
_logger.LogInformation($"Login request for {user.Username} with id {user.Id} processed successfully");
var token = await _userSession.OpenSessionAsync(user, loginRequest.DeviceInfo);
var tokens = await _userSession.OpenSessionAsync(user, loginRequest.DeviceInfo);
_logger.LogInformation($"Session for user {user.Username} with id {user.Id} has been opened");
return Ok(token);
return Ok(tokens);
}
catch (UserNotRegisteredException ex)
{