提交 18d650e5 编写于 作者: 不合群的混子's avatar 不合群的混子

添加返回状态码

上级 334574df
...@@ -36,9 +36,9 @@ public abstract class BaseAuthRequest implements AuthRequest { ...@@ -36,9 +36,9 @@ public abstract class BaseAuthRequest implements AuthRequest {
public AuthResponse login(String code) { public AuthResponse login(String code) {
try { try {
AuthUser user = this.getUserInfo(this.getAccessToken(code)); AuthUser user = this.getUserInfo(this.getAccessToken(code));
return AuthResponse.builder().data(user).build(); return AuthResponse.builder().code(ResponseStatus.SUCCESS.getCode()).data(user).build();
} catch (Exception e) { } catch (Exception e) {
return AuthResponse.builder().code(500).msg(e.getMessage()).build(); return AuthResponse.builder().code(ResponseStatus.FAILURE.getCode()).msg(e.getMessage()).build();
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册