Centralise files related to talking to the Toggl apis to the toggl_api module
This commit is contained in:
parent
1df76ea573
commit
ee21753411
@ -1,5 +1,5 @@
|
||||
use crate::entity::{client, project, time_entry};
|
||||
use crate::types::{Project, ProjectClient, ReportEntry, TimeEntry};
|
||||
use crate::toggl_api::types::{Project, ProjectClient, ReportEntry, TimeEntry};
|
||||
use sea_orm::sea_query::OnConflict;
|
||||
use sea_orm::{NotSet, Set};
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
use crate::api_client::TogglApiClient;
|
||||
use crate::toggl_api::TogglApiClient;
|
||||
use crate::entity::prelude::TimeEntry;
|
||||
use crate::entity::time_entry;
|
||||
use crate::entity::time_entry::ActiveModel;
|
||||
use crate::types::{Current, Project, ProjectClient, ReportEntry, TogglQuery};
|
||||
use crate::toggl_api::types::{Current, Project, ProjectClient, ReportEntry, TogglQuery};
|
||||
use anyhow::anyhow;
|
||||
use axum::extract::multipart::Field;
|
||||
use axum::extract::{Multipart, Query};
|
||||
@ -25,13 +25,12 @@ use std::net::SocketAddr;
|
||||
use tower_http::trace::TraceLayer;
|
||||
use tracing::{debug, instrument};
|
||||
|
||||
mod api_client;
|
||||
mod db;
|
||||
mod entity;
|
||||
mod poll;
|
||||
mod types;
|
||||
mod utils;
|
||||
mod csv_parser;
|
||||
mod toggl_api;
|
||||
|
||||
#[derive(Debug, Clone, Parser)]
|
||||
struct Config {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
use crate::api_client::TogglApiClient;
|
||||
use crate::toggl_api::TogglApiClient;
|
||||
use crate::entity::{client, project, time_entry};
|
||||
use crate::types::{Project, ProjectClient, TogglQuery};
|
||||
use crate::toggl_api::types::{Project, ProjectClient, TogglQuery};
|
||||
use sea_orm::{DatabaseConnection, EntityTrait, QuerySelect};
|
||||
use tracing::instrument;
|
||||
use crate::{day_exclusivity_condition, utils};
|
||||
|
||||
@ -5,7 +5,7 @@ use std::time::Duration;
|
||||
use hyper::HeaderMap;
|
||||
use tracing::instrument;
|
||||
use tracing::log::debug;
|
||||
use crate::types::{Current, Project, ProjectClient, ReportEntry, TogglQuery};
|
||||
use crate::toggl_api::types::{Current, Project, ProjectClient, ReportEntry, TogglQuery};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct TogglApiClient {
|
||||
4
src/toggl_api/mod.rs
Normal file
4
src/toggl_api/mod.rs
Normal file
@ -0,0 +1,4 @@
|
||||
pub mod api_client;
|
||||
pub mod types;
|
||||
|
||||
pub use api_client::TogglApiClient;
|
||||
Loading…
Reference in New Issue
Block a user