Get info from status page json

This commit is contained in:
Marco De Araujo 2025-12-22 11:40:28 -04:00
parent d024280878
commit dbe196f388
8 changed files with 113 additions and 30 deletions

View file

@ -0,0 +1,8 @@
use super::model::StatusPageResponse;
use crate::i18n::t;
use anyhow::{Context, Ok, Result};
pub fn parse_response(json_text: &str) -> Result<StatusPageResponse> {
let mut response: StatusPageResponse = serde_json::from_str(json_text)?; //.with_context(|| t("invalid-json-status-page"))?;
Ok(response)
}