added pagination controls
All checks were successful
Build and Push Image / build-and-push (push) Successful in 4m33s
All checks were successful
Build and Push Image / build-and-push (push) Successful in 4m33s
This commit is contained in:
@@ -37,7 +37,7 @@ public class AobaService(IMongoDatabase db)
|
||||
var total = await find.CountDocumentsAsync();
|
||||
page -= 1;
|
||||
var items = await find.Sort(sort).Skip(page * pageSize).Limit(pageSize).ToListAsync();
|
||||
return new PagedResult<Media>(items, page, pageSize, total);
|
||||
return new PagedResult<Media>(items, page, pageSize, (int)total);
|
||||
}
|
||||
|
||||
public async Task<List<Media>> FindMediaWithExtAsync(string ext, CancellationToken cancellationToken = default)
|
||||
|
||||
Reference in New Issue
Block a user