changed api apth
This commit is contained in:
parent
14029ef399
commit
cbb8fe9555
|
@ -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(actix_fs::Files::new("/static", "./static").index_file("index.html")) // static directory
|
||||||
.service(web::redirect("/favicon.ico", "/static/favicon.ico")) //? special redirect for favicon
|
.service(web::redirect("/favicon.ico", "/static/favicon.ico")) //? special redirect for favicon
|
||||||
})
|
})
|
||||||
|
|
||||||
.bind(bindip)?
|
.bind(bindip)?
|
||||||
.run()
|
.run()
|
||||||
.await?;
|
.await?;
|
||||||
|
|
|
@ -3,15 +3,13 @@ pub mod events;
|
||||||
|
|
||||||
use std::{borrow::BorrowMut, sync::Mutex};
|
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};
|
use crate::database::{models, Database};
|
||||||
|
|
||||||
pub fn get_scope() -> Scope {
|
pub fn get_scope() -> Resource {
|
||||||
Scope::new("/github")
|
web::resource("/").route(
|
||||||
.service(
|
web::route().to(handler)
|
||||||
web::resource("/")
|
|
||||||
.to(handler)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user