Fmt
This commit is contained in:
parent
2a7a19fdf0
commit
c62ec9b98b
1 changed files with 6 additions and 5 deletions
|
|
@ -4,7 +4,7 @@ use crate::{
|
||||||
AppState,
|
AppState,
|
||||||
database::{
|
database::{
|
||||||
Database,
|
Database,
|
||||||
models::{DocumentId, EventRecord, StoredDocumentVersion, VaultEvent, VaultId},
|
models::{DocumentId, EventRecord, StoredDocumentVersion, VaultEvent},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config::user_config::User,
|
config::user_config::User,
|
||||||
|
|
@ -34,7 +34,7 @@ pub async fn put_file_content(
|
||||||
State(state): State<AppState>,
|
State(state): State<AppState>,
|
||||||
Json(push): Json<PutFileContent>,
|
Json(push): Json<PutFileContent>,
|
||||||
) -> Result<Json<DocumentUpdateResponse>, SyncServerError> {
|
) -> Result<Json<DocumentUpdateResponse>, SyncServerError> {
|
||||||
debug!("Pushing document `{}` in vault `{}`", document_id, vault_id);
|
debug!("Pushing document `{document_id}` in vault `{vault_id}`");
|
||||||
|
|
||||||
let fingerprint = Sha256::digest(
|
let fingerprint = Sha256::digest(
|
||||||
serde_json::to_vec(&("content", document_id, &push))
|
serde_json::to_vec(&("content", document_id, &push))
|
||||||
|
|
@ -74,8 +74,7 @@ pub async fn put_file_content(
|
||||||
}
|
}
|
||||||
} else if push.parent_version_id.is_some() {
|
} else if push.parent_version_id.is_some() {
|
||||||
return Err(not_found_error(anyhow!(
|
return Err(not_found_error(anyhow!(
|
||||||
"Document {} does not exist",
|
"Document {document_id} does not exist"
|
||||||
document_id
|
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -153,7 +152,9 @@ mod tests {
|
||||||
use crate::{
|
use crate::{
|
||||||
app_state::database::{
|
app_state::database::{
|
||||||
Database,
|
Database,
|
||||||
models::{DocumentVersionWithoutContent, StoredDocumentVersion, VaultUpdateId},
|
models::{
|
||||||
|
DocumentVersionWithoutContent, StoredDocumentVersion, VaultId, VaultUpdateId,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
config::{
|
config::{
|
||||||
Config, database_config::DatabaseConfig, server_config::ServerConfig,
|
Config, database_config::DatabaseConfig, server_config::ServerConfig,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue