未验证 提交 e70dae0b 编写于 作者: 智布道's avatar 智布道 👁 提交者: GitHub

Merge pull request #10 from xkcoding/fix-response-code

 添加返回状态码
......@@ -36,9 +36,9 @@ public abstract class BaseAuthRequest implements AuthRequest {
public AuthResponse login(String code) {
try {
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) {
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.
先完成此消息的编辑!
想要评论请 注册