Skip to content

Commit

Permalink
feat: [torrust#94] add prefix v1 to tracker API
Browse files Browse the repository at this point in the history
The tracker API uses now a prefix with the version. It has changed from:

http://0.0.0.0:1212/api/stats?token=MyAccessToken

to

http://0.0.0.0:1212/api/v1/stats?token=MyAccessToken
  • Loading branch information
josecelano committed Mar 13, 2023
1 parent 0711c3d commit 0c4eb02
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ impl TrackerService {
let settings = self.cfg.settings.read().await;

let request_url = format!(
"{}/api/whitelist/{}?token={}",
"{}/api/v1/whitelist/{}?token={}",
settings.tracker.api_url, info_hash, settings.tracker.token
);

Expand All @@ -72,7 +72,7 @@ impl TrackerService {
let settings = self.cfg.settings.read().await;

let request_url = format!(
"{}/api/whitelist/{}?token={}",
"{}/api/v1/whitelist/{}?token={}",
settings.tracker.api_url, info_hash, settings.tracker.token
);

Expand Down Expand Up @@ -114,7 +114,7 @@ impl TrackerService {
let settings = self.cfg.settings.read().await;

let request_url = format!(
"{}/api/key/{}?token={}",
"{}/api/v1/key/{}?token={}",
settings.tracker.api_url, settings.tracker.token_valid_seconds, settings.tracker.token
);

Expand Down Expand Up @@ -149,7 +149,7 @@ impl TrackerService {
let tracker_url = settings.tracker.url.clone();

let request_url = format!(
"{}/api/torrent/{}?token={}",
"{}/api/v1/torrent/{}?token={}",
settings.tracker.api_url, info_hash, settings.tracker.token
);

Expand Down

0 comments on commit 0c4eb02

Please sign in to comment.