mirror of
https://github.com/Jackzmc/storage.git
synced 2025-05-12 03:53:14 +00:00
Get icons working
This commit is contained in:
parent
0e0b4e941f
commit
86bcabd1fc
9 changed files with 170 additions and 22 deletions
|
@ -1,5 +1,5 @@
|
|||
use std::sync::Arc;
|
||||
use log::debug;
|
||||
use log::{debug, error, info, trace, warn};
|
||||
use rocket::{catch, launch, routes, Request, State};
|
||||
use rocket::data::ByteUnit;
|
||||
use rocket::fs::{relative, FileServer};
|
||||
|
@ -34,7 +34,11 @@ async fn rocket() -> _ {
|
|||
setup_logger();
|
||||
dotenvy::dotenv().ok();
|
||||
|
||||
let handlebars = Handlebars::new();
|
||||
trace!("trace");
|
||||
debug!("debug");
|
||||
info!("info");
|
||||
warn!("warn");
|
||||
error!("error");
|
||||
|
||||
let pool = PgPoolOptions::new()
|
||||
.max_connections(5)
|
||||
|
@ -61,13 +65,16 @@ async fn rocket() -> _ {
|
|||
.manage(repo_manager)
|
||||
.manage(libraries_manager)
|
||||
.mount("/static", FileServer::from(relative!("static")))
|
||||
.mount("/api/library", routes![
|
||||
api::library::move_file, api::library::upload_file, api::library::download_file, api::library::list_files, api::library::get_file, api::library::delete_file,
|
||||
])
|
||||
.mount("/", routes![
|
||||
ui::user::index, ui::user::list_library_files
|
||||
])
|
||||
.mount("/api", routes![
|
||||
api::library::move_file, api::library::upload_file, api::library::download_file, api::library::list_files, api::library::get_file, api::library::delete_file,
|
||||
])
|
||||
.attach(Template::fairing())
|
||||
.attach(Template::custom(|engines| {
|
||||
let _ = engines
|
||||
.handlebars;
|
||||
}))
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue