aaaaaaaaaaaa
This commit is contained in:
parent
cbb8fe9555
commit
d0defb101e
|
@ -1,12 +1,13 @@
|
|||
pub mod webhooks;
|
||||
mod webhooks;
|
||||
|
||||
use actix_web::Scope;
|
||||
use actix_web::{web, HttpResponse, Scope};
|
||||
|
||||
|
||||
|
||||
|
||||
pub fn get_scope() -> Scope {
|
||||
Scope::new("/api")
|
||||
.route("/", web::get().to(HttpResponse::Ok))
|
||||
.service(
|
||||
webhooks::get_scope()
|
||||
)
|
||||
|
|
|
@ -3,14 +3,15 @@ pub mod events;
|
|||
|
||||
use std::{borrow::BorrowMut, sync::Mutex};
|
||||
|
||||
use actix_web::{http::header, web::{self, Bytes, Data}, HttpRequest, HttpResponse, Resource, Responder, Result, Scope};
|
||||
use actix_web::{http::header, web::{self, Bytes, Data}, HttpRequest, HttpResponse, Responder, Result, Scope};
|
||||
|
||||
use crate::database::{models, Database};
|
||||
|
||||
pub fn get_scope() -> Resource {
|
||||
web::resource("/").route(
|
||||
web::route().to(handler)
|
||||
)
|
||||
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<Mutex<Database>>) -> Result<impl Responder> {
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
use actix_web::Scope;
|
||||
use actix_web::{web, HttpResponse, Scope};
|
||||
|
||||
pub mod github;
|
||||
|
||||
|
||||
pub fn get_scope() -> Scope {
|
||||
Scope::new("/wh")
|
||||
.route("/", web::get().to(HttpResponse::Ok))
|
||||
.service(
|
||||
github::get_scope()
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue
Block a user