uwu
This commit is contained in:
parent
d0defb101e
commit
74dd2bf6d9
|
@ -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<Mutex<Database>>) -> Result<impl Responder> {
|
||||
let Some(auth) = req.headers().get(header::AUTHORIZATION) else {
|
||||
return Ok(HttpResponse::Unauthorized());
|
||||
|
|
|
@ -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))
|
||||
}
|
Loading…
Reference in New Issue
Block a user