@@ -13,7 +13,7 @@ use tokio::sync::RwLock;
13
13
use torrust_index_located_error:: { Located , LocatedError } ;
14
14
use url:: { ParseError , Url } ;
15
15
16
- pub type TorrustIndex = v1:: Settings ;
16
+ pub type Settings = v1:: Settings ;
17
17
pub type Api = v1:: api:: Api ;
18
18
pub type Auth = v1:: auth:: Auth ;
19
19
pub type Database = v1:: database:: Database ;
@@ -225,13 +225,13 @@ impl Tsl {
225
225
#[ derive( Debug ) ]
226
226
pub struct Configuration {
227
227
/// The state of the configuration.
228
- pub settings : RwLock < TorrustIndex > ,
228
+ pub settings : RwLock < Settings > ,
229
229
}
230
230
231
231
impl Default for Configuration {
232
232
fn default ( ) -> Configuration {
233
233
Configuration {
234
- settings : RwLock :: new ( TorrustIndex :: default ( ) ) ,
234
+ settings : RwLock :: new ( Settings :: default ( ) ) ,
235
235
}
236
236
}
237
237
}
@@ -252,22 +252,22 @@ impl Configuration {
252
252
let config_builder = Config :: builder ( )
253
253
. add_source ( File :: from_str ( & info. index_toml , FileFormat :: Toml ) )
254
254
. build ( ) ?;
255
- let mut index_config : TorrustIndex = config_builder. try_deserialize ( ) ?;
255
+ let mut settings : Settings = config_builder. try_deserialize ( ) ?;
256
256
257
257
if let Some ( ref token) = info. tracker_api_token {
258
- index_config . override_tracker_api_token ( token) ;
258
+ settings . override_tracker_api_token ( token) ;
259
259
} ;
260
260
261
261
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) ;
263
263
} ;
264
264
265
265
Ok ( Configuration {
266
- settings : RwLock :: new ( index_config ) ,
266
+ settings : RwLock :: new ( settings ) ,
267
267
} )
268
268
}
269
269
270
- pub async fn get_all ( & self ) -> TorrustIndex {
270
+ pub async fn get_all ( & self ) -> Settings {
271
271
let settings_lock = self . settings . read ( ) . await ;
272
272
273
273
settings_lock. clone ( )
0 commit comments