Update formatting

This commit is contained in:
Andras Schmelczer 2024-12-08 18:22:17 +00:00
parent dda356ea00
commit 49638e5aa7
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
27 changed files with 239 additions and 232 deletions

View file

@ -1,21 +1,20 @@
use crate::app_state::AppState;
use crate::database::models::DocumentVersionWithoutContent;
use crate::database::models::StoredDocumentVersion;
use crate::database::models::VaultId;
use crate::errors::client_error;
use crate::errors::server_error;
use crate::errors::SyncServerError;
use anyhow::Context;
use axum::extract::Path;
use axum::extract::State;
use axum::Json;
use axum_extra::headers::authorization::Bearer;
use axum_extra::headers::Authorization;
use axum_extra::TypedHeader;
use axum::{
extract::{Path, State},
Json,
};
use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
use sync_lib::base64_to_bytes;
use super::auth::auth;
use super::requests::CreateDocumentVersion;
use super::{auth::auth, requests::CreateDocumentVersion};
use crate::{
app_state::AppState,
database::models::{DocumentVersionWithoutContent, StoredDocumentVersion, VaultId},
errors::{client_error, server_error, SyncServerError},
};
#[axum::debug_handler]
pub async fn create_document(

View file

@ -1,21 +1,19 @@
use crate::app_state::AppState;
use crate::database::models::DocumentId;
use crate::database::models::StoredDocumentVersion;
use crate::database::models::VaultId;
use crate::errors::not_found_error;
use crate::errors::server_error;
use crate::errors::SyncServerError;
use anyhow::anyhow;
use anyhow::Context;
use axum::extract::Path;
use axum::extract::State;
use axum::Json;
use axum_extra::headers::authorization::Bearer;
use axum_extra::headers::Authorization;
use axum_extra::TypedHeader;
use anyhow::{anyhow, Context};
use axum::{
extract::{Path, State},
Json,
};
use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
use super::auth::auth;
use super::requests::DeleteDocumentVersion;
use super::{auth::auth, requests::DeleteDocumentVersion};
use crate::{
app_state::AppState,
database::models::{DocumentId, StoredDocumentVersion, VaultId},
errors::{not_found_error, server_error, SyncServerError},
};
#[axum::debug_handler]
pub async fn delete_document(

View file

@ -1,19 +1,19 @@
use crate::app_state::AppState;
use crate::database::models::DocumentId;
use crate::database::models::DocumentVersion;
use crate::database::models::VaultId;
use crate::errors::not_found_error;
use crate::errors::server_error;
use crate::errors::SyncServerError;
use anyhow::anyhow;
use axum::extract::Path;
use axum::extract::State;
use axum::Json;
use axum_extra::headers::authorization::Bearer;
use axum_extra::headers::Authorization;
use axum_extra::TypedHeader;
use axum::{
extract::{Path, State},
Json,
};
use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
use super::auth::auth;
use crate::{
app_state::AppState,
database::models::{DocumentId, DocumentVersion, VaultId},
errors::{not_found_error, server_error, SyncServerError},
};
#[axum::debug_handler]
pub async fn fetch_latest_document_version(

View file

@ -1,16 +1,18 @@
use crate::app_state::AppState;
use crate::database::models::DocumentVersionWithoutContent;
use crate::database::models::VaultId;
use crate::errors::server_error;
use crate::errors::SyncServerError;
use axum::extract::Path;
use axum::extract::State;
use axum::Json;
use axum_extra::headers::authorization::Bearer;
use axum_extra::headers::Authorization;
use axum_extra::TypedHeader;
use axum::{
extract::{Path, State},
Json,
};
use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
use super::auth::auth;
use crate::{
app_state::AppState,
database::models::{DocumentVersionWithoutContent, VaultId},
errors::{server_error, SyncServerError},
};
#[axum::debug_handler]
pub async fn fetch_latest_documents(

View file

@ -1,25 +1,20 @@
use crate::app_state::AppState;
use crate::database::models::DocumentId;
use crate::database::models::DocumentVersionWithoutContent;
use crate::database::models::StoredDocumentVersion;
use crate::database::models::VaultId;
use crate::errors::client_error;
use crate::errors::not_found_error;
use crate::errors::server_error;
use crate::errors::SyncServerError;
use anyhow::anyhow;
use anyhow::Context;
use axum::extract::Path;
use axum::extract::State;
use axum::Json;
use axum_extra::headers::authorization::Bearer;
use axum_extra::headers::Authorization;
use axum_extra::TypedHeader;
use sync_lib::base64_to_bytes;
use sync_lib::base64_to_string;
use anyhow::{anyhow, Context};
use axum::{
extract::{Path, State},
Json,
};
use axum_extra::{
headers::{authorization::Bearer, Authorization},
TypedHeader,
};
use sync_lib::{base64_to_bytes, base64_to_string};
use super::auth::auth;
use super::requests::UpdateDocumentVersion;
use super::{auth::auth, requests::UpdateDocumentVersion};
use crate::{
app_state::AppState,
database::models::{DocumentId, DocumentVersionWithoutContent, StoredDocumentVersion, VaultId},
errors::{client_error, not_found_error, server_error, SyncServerError},
};
#[axum::debug_handler]
pub async fn update_document(