Skip to content

Commit

Permalink
reafctor: reaname TorrustIndex to Settings
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed May 17, 2024
1 parent c9b1d5a commit 07a3fb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use tokio::sync::RwLock;
use torrust_index_located_error::{Located, LocatedError};
use url::{ParseError, Url};

pub type TorrustIndex = v1::TorrustIndex;
pub type TorrustIndex = v1::Settings;
pub type Api = v1::api::Api;
pub type Auth = v1::auth::Auth;
pub type Database = v1::database::Database;
Expand Down
4 changes: 2 additions & 2 deletions src/config/v1/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use self::website::Website;

/// The whole configuration for the index.
#[derive(Debug, Default, Clone, Serialize, Deserialize, PartialEq)]
pub struct TorrustIndex {
pub struct Settings {
/// Logging level. Possible values are: `Off`, `Error`, `Warn`, `Info`,
/// `Debug` and `Trace`. Default is `Info`.
pub log_level: Option<String>,
Expand All @@ -46,7 +46,7 @@ pub struct TorrustIndex {
pub tracker_statistics_importer: TrackerStatisticsImporter,
}

impl TorrustIndex {
impl Settings {
pub fn override_tracker_api_token(&mut self, tracker_api_token: &str) {
self.tracker.override_tracker_api_token(tracker_api_token);
}
Expand Down

0 comments on commit 07a3fb6

Please sign in to comment.