fix static path usage
This commit is contained in:
		
							parent
							
								
									fa45a890ad
								
							
						
					
					
						commit
						9adcb1619a
					
				@ -1,3 +1,5 @@
 | 
			
		||||
use std::env;
 | 
			
		||||
 | 
			
		||||
pub mod api;
 | 
			
		||||
pub mod db;
 | 
			
		||||
pub mod handlebars_helper;
 | 
			
		||||
@ -9,7 +11,8 @@ pub struct CssPath {
 | 
			
		||||
 | 
			
		||||
impl Default for CssPath {
 | 
			
		||||
    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")
 | 
			
		||||
            .next()
 | 
			
		||||
            .expect("Failed to find file")
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user