Skip to content

Commit cc8d771

Browse files
committed
controllers/version/docs: Simplify return type
1 parent ca72085 commit cc8d771

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/controllers/version/docs.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ use crate::auth::AuthCheck;
66
use crate::controllers::helpers::authorization::Rights;
77
use crate::util::errors::{AppResult, custom, server_error};
88
use crate::worker::jobs;
9-
use axum::response::{IntoResponse as _, Response};
109
use crates_io_worker::BackgroundJob as _;
1110
use http::StatusCode;
1211
use http::request::Parts;
@@ -26,7 +25,7 @@ pub async fn rebuild_version_docs(
2625
app: AppState,
2726
path: CrateVersionPath,
2827
req: Parts,
29-
) -> AppResult<Response> {
28+
) -> AppResult<StatusCode> {
3029
let mut conn = app.db_write().await?;
3130
let auth = AuthCheck::only_cookie().check(&req, &mut conn).await?;
3231

@@ -54,7 +53,7 @@ pub async fn rebuild_version_docs(
5453
server_error("failed to enqueue background job")
5554
})?;
5655

57-
Ok(StatusCode::CREATED.into_response())
56+
Ok(StatusCode::CREATED)
5857
}
5958

6059
#[cfg(test)]

0 commit comments

Comments
 (0)