Error code standardization

This commit is contained in:
skiffer-git
2023-02-07 20:28:34 +08:00
parent d59c4367fb
commit 0a2e55311c
20 changed files with 802 additions and 1422 deletions
+2 -3
View File
@@ -11,8 +11,8 @@ import (
"context"
)
func (s *friendServer) GetBlacks(ctx context.Context, req *pbFriend.GetBlacksReq) (*pbFriend.GetBlacksResp, error) {
resp := &pbFriend.GetBlacksResp{}
func (s *friendServer) GetPaginationBlacks(ctx context.Context, req *pbFriend.GetPaginationBlacksReq) (resp *pbFriend.GetPaginationBlacksResp, err error) {
resp = &pbFriend.GetPaginationBlacksResp{}
if err := check.Access(ctx, req.UserID); err != nil {
return nil, err
}
@@ -24,7 +24,6 @@ func (s *friendServer) GetBlacks(ctx context.Context, req *pbFriend.GetBlacksReq
if err != nil {
return nil, err
}
resp.Total = int32(total)
return resp, nil
}