code beutifying
This commit is contained in:
parent
64cf89b185
commit
244fc759ea
1 changed files with 8 additions and 3 deletions
|
@ -1,16 +1,21 @@
|
||||||
use serde::Serialize;
|
|
||||||
use reqwest::Client;
|
use reqwest::Client;
|
||||||
|
use serde::Serialize;
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
pub struct RadioData {
|
pub struct RadioData {
|
||||||
pub key: String,
|
pub key: String,
|
||||||
pub radio: String,
|
pub radio: String,
|
||||||
pub frequency : String,
|
pub frequency: String,
|
||||||
pub mode: String,
|
pub mode: String,
|
||||||
pub power: String,
|
pub power: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
pub async fn upload(url: &str, radio_data: &RadioData) {
|
pub async fn upload(url: &str, radio_data: &RadioData) {
|
||||||
let _res = Client::new().post(url).json(&radio_data).send().await.unwrap();
|
let _res = Client::new()
|
||||||
|
.post(url)
|
||||||
|
.json(&radio_data)
|
||||||
|
.send()
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue