feat(readarr): fetch the Readarr security config and expose it on the CLI
This commit is contained in:
6 files changed
+117
-4
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::models::servarr_models::{DiskSpace, HostConfig, SystemStatus};
|
||||
use crate::models::servarr_models::{DiskSpace, HostConfig, SecurityConfig, SystemStatus};
|
||||
use crate::network::readarr_network::ReadarrEvent;
|
||||
use crate::network::{Network, RequestMethod};
|
||||
use anyhow::Result;
|
||||
@@ -41,6 +41,21 @@ impl Network<'_, '_> {
|
||||
.await
|
||||
}
|
||||
|
||||
pub(in crate::network::readarr_network) async fn get_readarr_security_config(
|
||||
&mut self,
|
||||
) -> Result<SecurityConfig> {
|
||||
info!("Fetching Readarr security config");
|
||||
let event = ReadarrEvent::GetSecurityConfig;
|
||||
|
||||
let request_props = self
|
||||
.request_props_from(event, RequestMethod::Get, None::<()>, None, None)
|
||||
.await;
|
||||
|
||||
self
|
||||
.handle_request::<(), SecurityConfig>(request_props, |_, _| ())
|
||||
.await
|
||||
}
|
||||
|
||||
pub(in crate::network::readarr_network) async fn get_readarr_status(
|
||||
&mut self,
|
||||
) -> Result<SystemStatus> {
|
||||
|
||||
Reference in new issue
Block a user