lint code.
This commit is contained in:
1 parent
663bf85257
commit
f8d676e5df
9 files changed
+71
-62
No files matched your search
+10
-6
@@ -3,7 +3,13 @@
|
||||
use std::{env, path::PathBuf};
|
||||
|
||||
use actix_files;
|
||||
use actix_web::{dev::ServiceResponse, error, http::{header::ContentType, StatusCode}, middleware::{ErrorHandlerResponse, ErrorHandlers, Logger}, web, App, FromRequest, HttpRequest, HttpResponse, HttpServer, Responder, Result, Scope};
|
||||
use actix_web::{
|
||||
dev::ServiceResponse,
|
||||
error,
|
||||
http::{header::ContentType, StatusCode},
|
||||
middleware::{ErrorHandlerResponse, ErrorHandlers, Logger},
|
||||
web, App, FromRequest, HttpRequest, HttpResponse, HttpServer, Responder, Result, Scope,
|
||||
};
|
||||
use actix_web_lab::respond::Html;
|
||||
use async_channel;
|
||||
use futures::{pin_mut, select, FutureExt};
|
||||
@@ -13,7 +19,7 @@ use rusqlite::Connection;
|
||||
|
||||
use crate::events::Event;
|
||||
use crate::util::{CustomResult, Error, SQLiteConnectionFactory};
|
||||
use crate::webui::worker::{event_processor_loop};
|
||||
use crate::webui::worker::event_processor_loop;
|
||||
|
||||
mod index_views;
|
||||
mod services;
|
||||
@@ -71,13 +77,11 @@ fn create_auto_reloader(enable_template_autoreload: bool) -> AutoReloader {
|
||||
}
|
||||
|
||||
fn create_static_scope() -> Scope {
|
||||
web::scope("/static").service(
|
||||
actix_files::Files::new("/", "./resources/static/"))
|
||||
web::scope("/static").service(actix_files::Files::new("/", "./resources/static/"))
|
||||
}
|
||||
|
||||
fn create_api_scope() -> Scope {
|
||||
web::scope("/v1")
|
||||
.service(views::push_event)
|
||||
web::scope("/v1").service(views::push_event)
|
||||
}
|
||||
|
||||
fn create_views_scope() -> Scope {
|
||||
|
||||
Reference in new issue
Block a user