remove download endpoint

This commit is contained in:
2025-10-28 00:17:57 +01:00
parent 7abc10acde
commit b9d84fa72b
5 changed files with 12 additions and 101 deletions
-23
View File
@@ -60,11 +60,6 @@ struct DocumentListItem {
current_version: Option<DocumentVersionPayload>,
}
#[derive(Deserialize)]
struct DocumentDownload {
filename: String,
}
#[derive(Deserialize)]
struct BulkReanalyze {
queued: usize,
@@ -238,24 +233,6 @@ async fn upload_and_list_document() -> Result<()> {
.download_path
.starts_with("/download/"));
let download = app
.get(
&format!("/api/documents/{}/download", detail.document.id),
Some(&token),
)
.await?;
{
let status = download.status();
assert!(
status == StatusCode::OK
|| status == StatusCode::CREATED
|| status == StatusCode::NO_CONTENT
);
}
let body = body_to_vec(download.into_body()).await?;
let download_info: DocumentDownload = serde_json::from_slice(&body)?;
assert_eq!(download_info.filename, "doc.txt");
let redirect = app.get(&current_version.download_path, None).await?;
assert_eq!(redirect.status(), StatusCode::TEMPORARY_REDIRECT);
let location = redirect