@@ -178,53 +178,6 @@ pub async fn last_approved<A: Adapter>(
178
178
. unwrap ( ) )
179
179
}
180
180
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
-
228
181
pub async fn create_validator_messages < A : Adapter + ' static > (
229
182
req : Request < Body > ,
230
183
app : & Application < A > ,
0 commit comments