cargo fmt
This commit is contained in:
@@ -7,11 +7,9 @@ impl Contact {
|
|||||||
pub async fn get(
|
pub async fn get(
|
||||||
&self,
|
&self,
|
||||||
contact_id: &uuid::Uuid,
|
contact_id: &uuid::Uuid,
|
||||||
) -> Result<Vec<textsender_models::contact::Contact>, std::io::Error>
|
) -> Result<Vec<textsender_models::contact::Contact>, std::io::Error> {
|
||||||
{
|
|
||||||
let client = reqwest::Client::new();
|
let client = reqwest::Client::new();
|
||||||
let endpoint =
|
let endpoint = format!("api/v1/contact?id={contact_id}");
|
||||||
format!("api/v1/contact?id={contact_id}");
|
|
||||||
let api_url = format!("{}/{endpoint}", self.app.api_url);
|
let api_url = format!("{}/{endpoint}", self.app.api_url);
|
||||||
|
|
||||||
println!("Url: {api_url:?}");
|
println!("Url: {api_url:?}");
|
||||||
@@ -43,9 +41,7 @@ async fn parse_response(
|
|||||||
if lrs.is_empty() {
|
if lrs.is_empty() {
|
||||||
Err(std::io::Error::other("Error response is empty"))
|
Err(std::io::Error::other("Error response is empty"))
|
||||||
} else {
|
} else {
|
||||||
let mut events: Vec<
|
let mut events: Vec<textsender_models::contact::Contact> = Vec::new();
|
||||||
textsender_models::contact::Contact,
|
|
||||||
> = Vec::new();
|
|
||||||
|
|
||||||
for event in lrs.iter() {
|
for event in lrs.iter() {
|
||||||
let ll: textsender_models::contact::Contact =
|
let ll: textsender_models::contact::Contact =
|
||||||
@@ -66,4 +62,3 @@ async fn parse_response(
|
|||||||
Err(err) => Err(std::io::Error::other(err.to_string())),
|
Err(err) => Err(std::io::Error::other(err.to_string())),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -53,7 +53,7 @@ impl Service {
|
|||||||
|
|
||||||
let contacts = super::contact::Contact {
|
let contacts = super::contact::Contact {
|
||||||
app: self.app.clone(),
|
app: self.app.clone(),
|
||||||
token: self.token.clone()
|
token: self.token.clone(),
|
||||||
};
|
};
|
||||||
let events = events.unwrap_or_default();
|
let events = events.unwrap_or_default();
|
||||||
for event in events {
|
for event in events {
|
||||||
|
|||||||
Reference in New Issue
Block a user