Stash changes
This commit is contained in:
@@ -2,7 +2,10 @@ use reqwest::Client;
|
||||
use serde_json::Value;
|
||||
use std::collections::HashMap;
|
||||
use std::time::Duration;
|
||||
use base64::Engine;
|
||||
use base64::engine::general_purpose::STANDARD;
|
||||
use hyper::HeaderMap;
|
||||
use migration::cli::Cli;
|
||||
use tracing::instrument;
|
||||
use tracing::log::debug;
|
||||
use crate::toggl_api::types::{Current, Project, ProjectClient, ReportEntry, TogglQuery};
|
||||
@@ -22,7 +25,9 @@ impl TogglApiClient {
|
||||
true
|
||||
}
|
||||
|
||||
pub fn new(workspace_id: &str, toggl_auth: &str) -> Self {
|
||||
pub fn new(workspace_id: &str, api_token: &str) -> Self {
|
||||
let toggl_auth = &STANDARD.encode(&format!("{}:api_token", api_token));
|
||||
|
||||
let client = Client::builder()
|
||||
.default_headers(Self::default_headers(toggl_auth))
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user