diff --git a/src/web/routes/api/webhooks/github/mod.rs b/src/web/routes/api/webhooks/github/mod.rs index 2059d4e..56fd119 100644 --- a/src/web/routes/api/webhooks/github/mod.rs +++ b/src/web/routes/api/webhooks/github/mod.rs @@ -7,13 +7,6 @@ use actix_web::{http::header, web::{self, Bytes, Data}, HttpRequest, HttpRespons use crate::database::{models, Database}; -pub fn get_scope() -> Scope { - Scope::new("/github") - .route("/", web::get().to(HttpResponse::Ok)) - .route("/", web::post().to(handler)) - -} - pub async fn handler(req: HttpRequest, body: Bytes, db: Data>) -> Result { let Some(auth) = req.headers().get(header::AUTHORIZATION) else { return Ok(HttpResponse::Unauthorized()); diff --git a/src/web/routes/api/webhooks/mod.rs b/src/web/routes/api/webhooks/mod.rs index 4f97048..c56bebb 100644 --- a/src/web/routes/api/webhooks/mod.rs +++ b/src/web/routes/api/webhooks/mod.rs @@ -6,7 +6,6 @@ pub mod github; pub fn get_scope() -> Scope { Scope::new("/wh") .route("/", web::get().to(HttpResponse::Ok)) - .service( - github::get_scope() - ) + .route("/github", web::get().to(HttpResponse::Ok)) + .route("/github", web::post().to(github::handler)) } \ No newline at end of file