Give unique names to path params
This commit is contained in:
parent
407c56040e
commit
e9c6f99df2
8 changed files with 57 additions and 57 deletions
|
|
@ -16,7 +16,7 @@ use crate::{
|
|||
|
||||
// This is required for aide to infer the path parameter types and names
|
||||
#[derive(Deserialize, JsonSchema)]
|
||||
pub struct PathParams {
|
||||
pub struct FetchDocumentVersionPathParams {
|
||||
vault_id: VaultId,
|
||||
document_id: DocumentId,
|
||||
vault_update_id: VaultUpdateId,
|
||||
|
|
@ -25,11 +25,11 @@ pub struct PathParams {
|
|||
#[axum::debug_handler]
|
||||
pub async fn fetch_document_version(
|
||||
TypedHeader(auth_header): TypedHeader<Authorization<Bearer>>,
|
||||
Path(PathParams {
|
||||
Path(FetchDocumentVersionPathParams {
|
||||
vault_id,
|
||||
document_id,
|
||||
vault_update_id,
|
||||
}): Path<PathParams>,
|
||||
}): Path<FetchDocumentVersionPathParams>,
|
||||
State(mut state): State<AppState>,
|
||||
) -> Result<Json<DocumentVersion>, SyncServerError> {
|
||||
auth(&state, auth_header.token())?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue