fix: 统一分页请求的 offset 语义
This commit is contained in:
@@ -28,7 +28,7 @@ func (l *SearchCommentLikesLogic) SearchCommentLikes(in *pb.SearchCommentLikesRe
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
offset := in.GetPage()
|
||||
offset := in.GetOffset()
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func (l *SearchCommentsLogic) SearchComments(in *pb.SearchCommentsReq) (*pb.Sear
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
offset := in.GetPage()
|
||||
offset := in.GetOffset()
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ func (l *SearchPostLikesLogic) SearchPostLikes(in *pb.SearchPostLikesReq) (*pb.S
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
offset := in.GetPage()
|
||||
offset := in.GetOffset()
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ func (l *SearchPostsLogic) SearchPosts(in *pb.SearchPostsReq) (*pb.SearchPostsRe
|
||||
if limit <= 0 {
|
||||
limit = 20
|
||||
}
|
||||
offset := in.GetPage()
|
||||
offset := in.GetOffset()
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user