fix static path usage

This commit is contained in:
Franz Dietrich 2023-02-05 11:48:43 +01:00
parent fa45a890ad
commit 9adcb1619a
Signed by: dietrich
GPG Key ID: F0CE5A20AB5C4B27

View File

@ -1,3 +1,5 @@
use std::env;
pub mod api; pub mod api;
pub mod db; pub mod db;
pub mod handlebars_helper; pub mod handlebars_helper;
@ -9,7 +11,8 @@ pub struct CssPath {
impl Default for CssPath { impl Default for CssPath {
fn default() -> Self { fn default() -> Self {
let css_path = glob::glob("terminwahl_front/dist/my_bulma_colors*.css") let wasm_statics = env::var("PATH_TO_STATICS").expect("Failed to get statics path");
let css_path = glob::glob(&format!("{wasm_statics}my_bulma_colors*.css"))
.expect("Failed to find css file") .expect("Failed to find css file")
.next() .next()
.expect("Failed to find file") .expect("Failed to find file")