Reorganazing files
This commit is contained in:
parent
4ff103454e
commit
7270249ef6
10 changed files with 8 additions and 7 deletions
|
|
@ -7,8 +7,6 @@ use i18n::init_locales;
|
|||
|
||||
use crate::data::unify_data;
|
||||
mod data;
|
||||
mod heartbeat;
|
||||
mod status_page;
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(author, version, about)]
|
||||
|
|
@ -36,7 +34,7 @@ fn main() -> Result<()> {
|
|||
|
||||
let heartbeat_data = if heartbeat_response.status().is_success() {
|
||||
let json_text = heartbeat_response.text()?;
|
||||
heartbeat::parse_response(&json_text)?
|
||||
data::heartbeat::parse_response(&json_text)?
|
||||
} else {
|
||||
return Err(anyhow::anyhow!(heartbeat_response.status()));
|
||||
};
|
||||
|
|
@ -46,7 +44,7 @@ fn main() -> Result<()> {
|
|||
let status_page_response = client.get(status_page_url).send()?;
|
||||
let status_page_data = if status_page_response.status().is_success() {
|
||||
let json_text = status_page_response.text()?;
|
||||
status_page::parse_response(&json_text)?
|
||||
data::status_page::parse_response(&json_text)?
|
||||
} else {
|
||||
return Err(anyhow::anyhow!(status_page_response.status()));
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue