Skip to content

Commit 5f0e1c9

Browse files
committed
sentry - routes - channel - remove insert_events
1 parent 00abea5 commit 5f0e1c9

File tree

1 file changed

+0
-47
lines changed

1 file changed

+0
-47
lines changed

sentry/src/routes/channel.rs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -178,53 +178,6 @@ pub async fn last_approved<A: Adapter>(
178178
.unwrap())
179179
}
180180

181-
// pub async fn insert_events<A: Adapter + 'static>(
182-
// req: Request<Body>,
183-
// app: &Application<A>,
184-
// ) -> Result<Response<Body>, ResponseError> {
185-
// let (req_head, req_body) = req.into_parts();
186-
187-
// let auth = req_head.extensions.get::<Auth>();
188-
// let session = req_head
189-
// .extensions
190-
// .get::<Session>()
191-
// .expect("request should have session");
192-
193-
// let route_params = req_head
194-
// .extensions
195-
// .get::<RouteParams>()
196-
// .expect("request should have route params");
197-
198-
// let channel_id = ChannelId::from_hex(route_params.index(0))?;
199-
200-
// let body_bytes = hyper::body::to_bytes(req_body).await?;
201-
// let mut request_body = serde_json::from_slice::<HashMap<String, Vec<Event>>>(&body_bytes)?;
202-
203-
// let events = request_body
204-
// .remove("events")
205-
// .ok_or_else(|| ResponseError::BadRequest("invalid request".to_string()))?;
206-
207-
// //
208-
// // TODO #381: AIP#61 Spender Aggregator should be called
209-
// //
210-
211-
// // handle events - check access
212-
// // handle events - Update targeting rules
213-
// // calculate payout
214-
// // distribute fees
215-
// // handle spending - Spender Aggregate
216-
// // handle events - aggregate Events and put into analytics
217-
218-
// // app.event_aggregator
219-
// // .record(app, &channel_id, session, auth, events)
220-
// // .await?;
221-
222-
// Ok(Response::builder()
223-
// .header("Content-type", "application/json")
224-
// .body(serde_json::to_string(&SuccessResponse { success: true })?.into())
225-
// .unwrap())
226-
// }
227-
228181
pub async fn create_validator_messages<A: Adapter + 'static>(
229182
req: Request<Body>,
230183
app: &Application<A>,

0 commit comments

Comments
 (0)