Skip to content

Commit

Permalink
fix: read stacks-core http event POST payloads for ignored events
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed Oct 30, 2024
1 parent c90091b commit 5ae11ad
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/chainhook-sdk/src/observer/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -301,19 +301,19 @@ pub fn handle_new_mempool_tx(
success_response()
}

#[post("/drop_mempool_tx", format = "application/json")]
pub fn handle_drop_mempool_tx(ctx: &State<Context>) -> Json<JsonValue> {
ctx.try_log(|logger| slog::debug!(logger, "POST /drop_mempool_tx"));
#[post("/drop_mempool_tx", format = "application/json", data = "<payload>")]
pub fn handle_drop_mempool_tx(payload: Json<JsonValue>, ctx: &State<Context>) -> Json<JsonValue> {
ctx.try_log(|logger| slog::debug!(logger, "POST /drop_mempool_tx {:?}", payload));
// TODO(lgalabru): use propagate mempool events
Json(json!({
"status": 200,
"result": "Ok",
}))
}

#[post("/attachments/new", format = "application/json")]
pub fn handle_new_attachement(ctx: &State<Context>) -> Json<JsonValue> {
ctx.try_log(|logger| slog::debug!(logger, "POST /attachments/new"));
#[post("/attachments/new", format = "application/json", data = "<payload>")]
pub fn handle_new_attachement(payload: Json<JsonValue>, ctx: &State<Context>) -> Json<JsonValue> {
ctx.try_log(|logger| slog::debug!(logger, "POST /attachments/new {:?}", payload));
Json(json!({
"status": 200,
"result": "Ok",
Expand Down

0 comments on commit 5ae11ad

Please sign in to comment.