fix: align admin behavior and Kratos integrations
This commit is contained in:
@@ -93,11 +93,7 @@ func (r *announcementRepo) List(ctx context.Context, filter biz.AnnouncementFilt
|
||||
return nil, 0, err
|
||||
}
|
||||
if filter.PageSize > 0 {
|
||||
page := filter.Page
|
||||
if page < 1 {
|
||||
page = 1
|
||||
}
|
||||
db = db.Offset((page - 1) * filter.PageSize).Limit(filter.PageSize)
|
||||
db = applyPagination(db, filter.Page, filter.PageSize, 100)
|
||||
}
|
||||
var pos []announcementPO
|
||||
if err := db.Find(&pos).Error; err != nil {
|
||||
|
||||
Reference in New Issue
Block a user