Basic cours support #44
2 changed files with 1 additions and 4 deletions
|
@ -12,7 +12,7 @@ license = "AGPL-3.0-or-later"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
actix-web = { version = "4.5", default-features = false, features = ["macros", "compress-brotli"] }
|
actix-web = { version = "4.5", default-features = false, features = ["macros", "compress-brotli"] }
|
||||||
actix-files = "0.6"
|
actix-files = "0.6"
|
||||||
cached = { version = "0.49", features = ["async"] }
|
cached = { version = "0.49", features = ["async", "ahash"] }
|
||||||
ramhorns = "1.0"
|
ramhorns = "1.0"
|
||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
|
|
|
@ -47,7 +47,6 @@ fn compile_patterns(exclusion_list: Vec<String>) -> Vec<Regex> {
|
||||||
.collect()
|
.collect()
|
||||||
}
|
}
|
||||||
|
|
||||||
// #[once(time = 240)]
|
|
||||||
fn get_filetree(dir_path: &str, exclusion_patterns: &Vec<Regex>) -> FileNode {
|
fn get_filetree(dir_path: &str, exclusion_patterns: &Vec<Regex>) -> FileNode {
|
||||||
let children = std::fs::read_dir(dir_path)
|
let children = std::fs::read_dir(dir_path)
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
@ -116,8 +115,6 @@ fn get_content(
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Uncomment before release
|
|
||||||
// #[once(time = 60)]
|
|
||||||
fn build_page(info: web::Query<PathRequest>, config: Config) -> String {
|
fn build_page(info: web::Query<PathRequest>, config: Config) -> String {
|
||||||
let cours_dir = "data/cours";
|
let cours_dir = "data/cours";
|
||||||
let exclusion_list = config.fc.exclude_courses.unwrap();
|
let exclusion_list = config.fc.exclude_courses.unwrap();
|
||||||
|
|
Loading…
Reference in a new issue