diff --git a/src/web/mod.rs b/src/web/mod.rs index 034a1cc..ea9ccec 100644 --- a/src/web/mod.rs +++ b/src/web/mod.rs @@ -20,7 +20,6 @@ pub(crate) async fn start_actix(config: &Config, database: Database) -> anyhow:: .service(actix_fs::Files::new("/static", "./static").index_file("index.html")) // static directory .service(web::redirect("/favicon.ico", "/static/favicon.ico")) //? special redirect for favicon }) - .bind(bindip)? .run() .await?; diff --git a/src/web/routes/api/webhooks/github/mod.rs b/src/web/routes/api/webhooks/github/mod.rs index 9816654..83342b7 100644 --- a/src/web/routes/api/webhooks/github/mod.rs +++ b/src/web/routes/api/webhooks/github/mod.rs @@ -3,16 +3,14 @@ pub mod events; use std::{borrow::BorrowMut, sync::Mutex}; -use actix_web::{http::header, web::{self, Bytes, Data}, HttpRequest, HttpResponse, Responder, Result, Scope}; +use actix_web::{http::header, web::{self, Bytes, Data}, HttpRequest, HttpResponse, Resource, Responder, Result, Scope}; use crate::database::{models, Database}; -pub fn get_scope() -> Scope { - Scope::new("/github") - .service( - web::resource("/") - .to(handler) - ) +pub fn get_scope() -> Resource { + web::resource("/").route( + web::route().to(handler) + ) } pub async fn handler(req: HttpRequest, body: Bytes, db: Data>) -> Result {