Added channel and worker.
This commit is contained in:
1 parent
af687df9de
commit
5ff946af8f
5 files changed
+85
-38
No files matched your search
@@ -84,10 +84,12 @@ struct CreateEventPayload {
|
||||
pub async fn push_event(
|
||||
req: HttpRequest,
|
||||
tmpl_env: MiniJinjaRenderer,
|
||||
event_channel: web::Data<async_channel::Sender<i32>>,
|
||||
web::Json(form): web::Json<CreateEventPayload>,
|
||||
) -> actix_web::Result<impl Responder> {
|
||||
let shit = req.match_info().get("event_type").unwrap();
|
||||
println!("payload: {:?}", form);
|
||||
let _ = event_channel.send(56).await;
|
||||
let ctx = context! {
|
||||
event_type => shit,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user