微调了loginResponse DTO的字段名

This commit is contained in:
高子兴 2024-07-01 21:05:37 +08:00
parent 9c46495d40
commit cc1d63e76c
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class AuthenticationController {
if (isValidUser) { if (isValidUser) {
return new ResponseEntity<>(new LoginResponse("登录成功", JwtUtil.generateToken(loginRequest.getUsername())), HttpStatus.OK); return new ResponseEntity<>(new LoginResponse("登录成功", JwtUtil.generateToken(loginRequest.getUsername())), HttpStatus.OK);
} else { } else {
return new ResponseEntity<>(new LoginResponse("用户名或密码错误", ""), HttpStatus.UNAUTHORIZED); return new ResponseEntity<>(new LoginResponse("用户名或密码错误", null), HttpStatus.UNAUTHORIZED);
} }
} }

View File

@ -9,5 +9,5 @@ import lombok.Setter;
@AllArgsConstructor @AllArgsConstructor
public class LoginResponse { public class LoginResponse {
private String message; private String message;
private String jwt; private String token;
} }