Skip to content

Commit

Permalink
Merge #798: Increase max torrent page size
Browse files Browse the repository at this point in the history
4f0d1a4 refactor: [#797] fixed tests failing and update default max page size value (Mario)
fde858e fix: [#797] max torrent page size increased to 100 (Mario)

Pull request description:

  Fixes #797

ACKs for top commit:
  josecelano:
    ACK 4f0d1a4

Tree-SHA512: 5333beb01ee0098d279abbde077daed15c38c3a4b8ff1d950b656563880b904f9c33d279c53223b2b94ea822ffb190888d3b148d71e2689bab533c705aeb7911
  • Loading branch information
josecelano committed Jan 23, 2025
2 parents 33392f4 + 4f0d1a4 commit b6e4adf
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/config/v2/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ impl Api {
}

fn default_max_torrent_page_size() -> u8 {
30
100
}

fn default_user_profile_page_size() -> u8 {
10
}

fn default_max_user_profile_page_size() -> u8 {
100
30
}
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
//!
//! [api]
//! default_torrent_page_size = 10
//! max_torrent_page_size = 30
//! max_torrent_page_size = 100
//!
//! [tracker_statistics_importer]
//! torrent_info_update_interval = 3600
Expand Down
2 changes: 1 addition & 1 deletion src/web/api/server/v1/contexts/settings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
//! },
//! "api": {
//! "default_torrent_page_size": 10,
//! "max_torrent_page_size": 30
//! "max_torrent_page_size": 100
//! },
//! "registration": {
//! "email": {
Expand Down
2 changes: 1 addition & 1 deletion src/web/api/server/v1/contexts/torrent/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
//! ```toml
//! [api]
//! default_torrent_page_size = 10
//! max_torrent_page_size = 30
//! max_torrent_page_size = 100
//! ```
//!
//! **Sorting GET parameters**
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/web/api/v1/contexts/torrent/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mod for_guests {

let uploader = new_logged_in_user(&env).await;

let max_torrent_page_size = 30;
let max_torrent_page_size = 100;

// Given we insert one torrent more than the page size limit
for _ in 0..max_torrent_page_size {
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/default_configuration.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ user_quota_period_seconds = 3600

[api]
default_torrent_page_size = 10
max_torrent_page_size = 30
max_torrent_page_size = 100

[tracker_statistics_importer]
port = 3002
Expand Down

0 comments on commit b6e4adf

Please sign in to comment.