diff --git a/upub/routes/src/activitypub/file.rs b/upub/routes/src/activitypub/file.rs index ecb4bda..103017f 100644 --- a/upub/routes/src/activitypub/file.rs +++ b/upub/routes/src/activitypub/file.rs @@ -14,7 +14,11 @@ pub async fn upload( } let mut uploaded_something = false; - while let Some(field) = multipart.next_field().await.unwrap() { + while let Some(field) = multipart + .next_field() + .await + .unwrap() // TODO OOOPS THIS SLIPPED GET RID OF IT + { let _ = if let Some(filename) = field.file_name() { filename.to_string() } else { diff --git a/upub/routes/src/error.rs b/upub/routes/src/error.rs index 885ff08..9294107 100644 --- a/upub/routes/src/error.rs +++ b/upub/routes/src/error.rs @@ -6,7 +6,7 @@ pub enum ApiError { Database(#[from] sea_orm::DbErr), #[error("encountered malformed object: {0}")] - Field(#[from] apb::FieldErr), + Malformed(#[from] apb::FieldErr), #[error("http signature error: {0:?}")] HttpSignature(#[from] httpsign::HttpSignatureError), @@ -104,7 +104,7 @@ impl axum::response::IntoResponse for ApiError { "inner": format!("{pull:#?}"), })) ).into_response(), - ApiError::Field(x) => ( + ApiError::Malformed(x) => ( axum::http::StatusCode::BAD_REQUEST, axum::Json(serde_json::json!({ "error": "field",