Skip to content

Commit

Permalink
Made UsersStore to use new http client internally
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed Sep 30, 2024
1 parent 5764053 commit 6a6232b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rust/agama-lib/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl<'a> Store<'a> {
) -> Result<Store<'a>, ServiceError> {
Ok(Self {
localization: LocalizationStore::new(http_client.clone())?,
users: UsersStore::new()?,
users: UsersStore::new(http_client.clone())?,
network: NetworkStore::new(http_client.clone()).await?,
product: ProductStore::new(connection.clone()).await?,
software: SoftwareStore::new(connection.clone()).await?,
Expand Down
5 changes: 3 additions & 2 deletions rust/agama-lib/src/users/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
// find current contact information at www.suse.com.

use super::{FirstUser, FirstUserSettings, RootUserSettings, UserSettings, UsersHTTPClient};
use crate::base_http_client::BaseHTTPClient;
use crate::error::ServiceError;

/// Loads and stores the users settings from/to the D-Bus service.
Expand All @@ -27,9 +28,9 @@ pub struct UsersStore {
}

impl UsersStore {
pub fn new() -> Result<Self, ServiceError> {
pub fn new(client: BaseHTTPClient) -> Result<Self, ServiceError> {
Ok(Self {
users_client: UsersHTTPClient::new()?,
users_client: UsersHTTPClient::new_with_base(client)?,
})
}

Expand Down

0 comments on commit 6a6232b

Please sign in to comment.