forked from RyanGoodwill/backend
微调了loginResponse DTO的字段名
This commit is contained in:
parent
9c46495d40
commit
cc1d63e76c
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user