fix: DB pagination

This commit is contained in:
Deluan
2020-01-31 14:52:06 -05:00
committed by Deluan Quintão
parent f5071d1614
commit 4f4af34595
3 changed files with 12 additions and 9 deletions
+1 -2
View File
@@ -25,8 +25,7 @@ func NewAlbumRepository(ctx context.Context, o orm.Ormer) model.AlbumRepository
}
func (r *albumRepository) CountAll(options ...model.QueryOptions) (int64, error) {
sel := r.selectAlbum(options...)
return r.count(sel, options...)
return r.count(Select(), options...)
}
func (r *albumRepository) Exists(id string) (bool, error) {