fix: 统一管理员认证列表的分页参数为 offset/limit
This commit is contained in:
@@ -36,16 +36,16 @@ func (l *GetVerificationsLogic) GetVerifications(req *types.GetPendingListReq) (
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
page := req.Page
|
||||
if page < 1 {
|
||||
page = 1
|
||||
offset := req.Offset
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
limit := req.Size
|
||||
limit := req.Limit
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
verifications, err := l.svcCtx.UserVerificationsRpc.SearchUserVerifications(l.ctx, &pb.SearchUserVerificationsReq{
|
||||
Page: page - 1,
|
||||
Page: offset / limit,
|
||||
Limit: limit,
|
||||
Role: req.Role,
|
||||
Status: req.Status,
|
||||
|
||||
Reference in New Issue
Block a user