@@ -13,7 +13,7 @@ use tokio::sync::RwLock;
1313use torrust_index_located_error:: { Located , LocatedError } ;
1414use url:: { ParseError , Url } ;
1515
16- pub type TorrustIndex = v1:: Settings ;
16+ pub type Settings = v1:: Settings ;
1717pub type Api = v1:: api:: Api ;
1818pub type Auth = v1:: auth:: Auth ;
1919pub type Database = v1:: database:: Database ;
@@ -225,13 +225,13 @@ impl Tsl {
225225#[ derive( Debug ) ]
226226pub struct Configuration {
227227 /// The state of the configuration.
228- pub settings : RwLock < TorrustIndex > ,
228+ pub settings : RwLock < Settings > ,
229229}
230230
231231impl Default for Configuration {
232232 fn default ( ) -> Configuration {
233233 Configuration {
234- settings : RwLock :: new ( TorrustIndex :: default ( ) ) ,
234+ settings : RwLock :: new ( Settings :: default ( ) ) ,
235235 }
236236 }
237237}
@@ -252,22 +252,22 @@ impl Configuration {
252252 let config_builder = Config :: builder ( )
253253 . add_source ( File :: from_str ( & info. index_toml , FileFormat :: Toml ) )
254254 . build ( ) ?;
255- let mut index_config : TorrustIndex = config_builder. try_deserialize ( ) ?;
255+ let mut settings : Settings = config_builder. try_deserialize ( ) ?;
256256
257257 if let Some ( ref token) = info. tracker_api_token {
258- index_config . override_tracker_api_token ( token) ;
258+ settings . override_tracker_api_token ( token) ;
259259 } ;
260260
261261 if let Some ( ref secret_key) = info. auth_secret_key {
262- index_config . override_auth_secret_key ( secret_key) ;
262+ settings . override_auth_secret_key ( secret_key) ;
263263 } ;
264264
265265 Ok ( Configuration {
266- settings : RwLock :: new ( index_config ) ,
266+ settings : RwLock :: new ( settings ) ,
267267 } )
268268 }
269269
270- pub async fn get_all ( & self ) -> TorrustIndex {
270+ pub async fn get_all ( & self ) -> Settings {
271271 let settings_lock = self . settings . read ( ) . await ;
272272
273273 settings_lock. clone ( )
0 commit comments