From 74dd2bf6d9cb0ac83f57c8436d3d385ab7735cf9 Mon Sep 17 00:00:00 2001 From: MCorange99 Date: Sat, 30 Mar 2024 17:49:43 +0200 Subject: [PATCH] uwu --- src/web/routes/api/webhooks/github/mod.rs | 7 ------- src/web/routes/api/webhooks/mod.rs | 5 ++--- 2 files changed, 2 insertions(+), 10 deletions(-) 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