fix: 管理员认证列表按第一页返回待审批申请
This commit is contained in:
@@ -36,9 +36,17 @@ func (l *GetVerificationsLogic) GetVerifications(req *types.GetPendingListReq) (
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
page := req.Page
|
||||
if page < 1 {
|
||||
page = 1
|
||||
}
|
||||
limit := req.Size
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
verifications, err := l.svcCtx.UserVerificationsRpc.SearchUserVerifications(l.ctx, &pb.SearchUserVerificationsReq{
|
||||
Page: req.Page,
|
||||
Limit: req.Size,
|
||||
Page: page - 1,
|
||||
Limit: limit,
|
||||
Role: req.Role,
|
||||
Status: req.Status,
|
||||
})
|
||||
@@ -46,7 +54,7 @@ func (l *GetVerificationsLogic) GetVerifications(req *types.GetPendingListReq) (
|
||||
return nil, err
|
||||
}
|
||||
|
||||
var searchResults []types.VerificationItem
|
||||
searchResults := make([]types.VerificationItem, 0, len(verifications.UserVerifications))
|
||||
for _, v := range verifications.UserVerifications {
|
||||
temp := types.VerificationItem{}
|
||||
err = copier.Copy(&temp, v)
|
||||
|
||||
Reference in New Issue
Block a user