Reformats Code

This commit is contained in:
2024-02-25 02:11:17 -03:00
parent 11f01a6156
commit b8b8d5713f
13 changed files with 52 additions and 48 deletions

View File

@@ -1,7 +1,6 @@
use reqwest::header::AUTHORIZATION;
use crate::config::config_auth::ConfigAuth;
use crate::model::send_message::MessageAuthor;
use reqwest::header::AUTHORIZATION;
#[derive(Clone)]
pub struct AuthService {
@@ -21,9 +20,12 @@ impl AuthService {
let validation_url = format!("{}/user/login/validate", self.auth_url);
let client = reqwest::Client::new();
let response = client.post(validation_url.as_str())
let response = client
.post(validation_url.as_str())
.header(AUTHORIZATION, format!("Bearer {}", token))
.send().await.unwrap();
.send()
.await
.unwrap();
if response.status().is_success() {
let text = response.text().await.unwrap();
@@ -32,4 +34,4 @@ impl AuthService {
None
}
}
}