Always normalise vaultId and trim token

This commit is contained in:
Andras Schmelczer 2025-04-07 22:29:23 +01:00
parent 04a24d0b38
commit 74a8060246
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
11 changed files with 44 additions and 10 deletions

View file

@ -10,12 +10,15 @@ use crate::{
database::models::{DocumentId, DocumentVersion, VaultId, VaultUpdateId},
},
errors::{SyncServerError, not_found_error, server_error},
utils::normalize::normalize,
};
// This is required for aide to infer the path parameter types and names
#[derive(Deserialize, JsonSchema)]
pub struct FetchDocumentVersionPathParams {
#[serde(deserialize_with = "normalize")]
vault_id: VaultId,
document_id: DocumentId,
vault_update_id: VaultUpdateId,
}