Reorganazing files
This commit is contained in:
parent
4ff103454e
commit
7270249ef6
10 changed files with 8 additions and 7 deletions
9
src/data/status_page/parser.rs
Normal file
9
src/data/status_page/parser.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
use super::model::StatusPageResponse;
|
||||
use crate::i18n::t;
|
||||
use anyhow::{Context, Ok, Result};
|
||||
|
||||
pub fn parse_response(json_text: &str) -> Result<StatusPageResponse> {
|
||||
let response: StatusPageResponse =
|
||||
serde_json::from_str(json_text).with_context(|| t("invalid-json-status-page"))?;
|
||||
Ok(response)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue