feat(readarr): fetch the Readarr security config and expose it on the CLI

This commit is contained in:
Dark-Alex-17 committed 2026-08-20 16:15:34 -06:00
1 parent 1072585903
commit 97d67a6938
6 files changed
+117 -4

No files matched your search

+16 -1
View File
@@ -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> {