Adding code to check the queue
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
pub mod core;
|
||||
pub mod queue;
|
||||
|
||||
pub mod auth {
|
||||
pub struct Auth {
|
||||
@@ -118,3 +119,11 @@ pub mod auth {
|
||||
now > expire
|
||||
}
|
||||
}
|
||||
|
||||
pub fn auth_header(
|
||||
access_token: &str,
|
||||
) -> (reqwest::header::HeaderName, reqwest::header::HeaderValue) {
|
||||
let bearer = format!("Bearer {}", access_token);
|
||||
let header_value = reqwest::header::HeaderValue::from_str(&bearer).unwrap();
|
||||
(reqwest::header::AUTHORIZATION, header_value)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user