diff --git a/src/main/kotlin/net/halfbinary/scavengerhuntapi/controller/AuthController.kt b/src/main/kotlin/net/halfbinary/scavengerhuntapi/controller/AuthController.kt index aa7bc09..fd9d838 100644 --- a/src/main/kotlin/net/halfbinary/scavengerhuntapi/controller/AuthController.kt +++ b/src/main/kotlin/net/halfbinary/scavengerhuntapi/controller/AuthController.kt @@ -26,7 +26,7 @@ class AuthController(private val loginService: LoginService, private val jwtUtil val result = loginService.login(body.toDomain()) val accessToken = jwtUtils.generateToken(result.email) val refreshToken = refreshTokenService.generateRefreshToken(result.email) - val loginResponse = LoginResponse(accessToken, refreshToken) + val loginResponse = LoginResponse(accessToken, refreshToken, result.name) return ResponseEntity.ok(loginResponse) } diff --git a/src/main/kotlin/net/halfbinary/scavengerhuntapi/model/response/LoginResponse.kt b/src/main/kotlin/net/halfbinary/scavengerhuntapi/model/response/LoginResponse.kt index 5ce4073..1e9ab21 100644 --- a/src/main/kotlin/net/halfbinary/scavengerhuntapi/model/response/LoginResponse.kt +++ b/src/main/kotlin/net/halfbinary/scavengerhuntapi/model/response/LoginResponse.kt @@ -4,5 +4,6 @@ import net.halfbinary.scavengerhuntapi.model.RefreshId data class LoginResponse( val accessToken: String, - val refreshToken: RefreshId + val refreshToken: RefreshId, + val name: String )