2 Commits

Author SHA1 Message Date
Tom Alexander
9ed8905a5c Always return status code ok.
All checks were successful
semver Build semver has succeeded
format Build format has succeeded
clippy Build clippy has succeeded
build Build build has succeeded
rust-test Build rust-test has succeeded
2024-09-29 18:37:23 -04:00
Tom Alexander
8cb28459a0 Fix clippy lint. 2024-09-29 18:31:47 -04:00

View File

@@ -58,16 +58,18 @@ pub(crate) async fn hook(
}), }),
), ),
Err(_) => ( Err(_) => (
StatusCode::INTERNAL_SERVER_ERROR, // StatusCode::INTERNAL_SERVER_ERROR,
StatusCode::OK,
Json(HookResponse { Json(HookResponse {
ok: false, ok: false,
message: Some(format!("Failed to handle push event.")), message: Some("Failed to handle push event.".to_string()),
}), }),
), ),
} }
} }
HookRequest::Unrecognized(payload) => ( HookRequest::Unrecognized(payload) => (
StatusCode::BAD_REQUEST, // StatusCode::BAD_REQUEST,
StatusCode::OK,
Json(HookResponse { Json(HookResponse {
ok: false, ok: false,
message: Some(format!("unrecognized event type: {payload}")), message: Some(format!("unrecognized event type: {payload}")),