Reorganazing files

This commit is contained in:
Marco De Araujo 2025-12-23 05:14:56 -04:00
parent 4ff103454e
commit 7270249ef6
10 changed files with 8 additions and 7 deletions

View file

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