changed api apth

This commit is contained in:
Gvidas Juknevičius 2024-03-30 17:29:01 +02:00
parent 14029ef399
commit cbb8fe9555
Signed by: MCorange
GPG Key ID: 12B1346D720B7FBB
2 changed files with 5 additions and 8 deletions

View File

@ -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?;

View File

@ -3,15 +3,13 @@ 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)
)
}