From 0c4b03d89631c832585deb58dea130828c45c49d Mon Sep 17 00:00:00 2001 From: MCorange99 Date: Sat, 30 Mar 2024 17:59:01 +0200 Subject: [PATCH] Askgviadsbkabdsvlkuad:wq --- src/web/routes/api/webhooks/github/events/mod.rs | 2 +- src/web/routes/api/webhooks/github/mod.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/web/routes/api/webhooks/github/events/mod.rs b/src/web/routes/api/webhooks/github/events/mod.rs index 4bc1b24..6dc93d5 100644 --- a/src/web/routes/api/webhooks/github/events/mod.rs +++ b/src/web/routes/api/webhooks/github/events/mod.rs @@ -11,7 +11,7 @@ pub async fn release_handler(db: Data>, token: Token, body: Rele let title = format!("{} has been released on {}!", body.release.tag_name, body.repository.full_name); dbg!(body); - + body.hook // models::posts::Post::create_new( // db.lock().unwrap().borrow_mut(), // title, diff --git a/src/web/routes/api/webhooks/github/mod.rs b/src/web/routes/api/webhooks/github/mod.rs index 56fd119..c150df9 100644 --- a/src/web/routes/api/webhooks/github/mod.rs +++ b/src/web/routes/api/webhooks/github/mod.rs @@ -47,7 +47,10 @@ pub async fn handler(req: HttpRequest, body: Bytes, db: Data>) - match event { types::Event::Release(body) => events::release_handler(db, token, body, json).await, - _ => Ok(HttpResponse::Ok()) + _ => { + dbg!(json); + Ok(HttpResponse::Ok()) + } } }