mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 01:24:04 +00:00 
			
		
		
		
	Get path to user data files
This commit is contained in:
		@@ -2,4 +2,5 @@
 | 
			
		||||
//!
 | 
			
		||||
//! This module contains utilities that can be used anywhere in the code
 | 
			
		||||
 | 
			
		||||
pub mod crypt_utils;
 | 
			
		||||
pub mod crypt_utils;
 | 
			
		||||
pub mod user_data_utils;
 | 
			
		||||
							
								
								
									
										12
									
								
								src/utils/user_data_utils.rs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								src/utils/user_data_utils.rs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,12 @@
 | 
			
		||||
//! # User data utilities
 | 
			
		||||
//!
 | 
			
		||||
//! @author Pierre Hubert
 | 
			
		||||
 | 
			
		||||
use crate::data::config::conf;
 | 
			
		||||
 | 
			
		||||
/// Get the full URL to a user data file
 | 
			
		||||
///
 | 
			
		||||
/// `uri` should contain the path to the target resource
 | 
			
		||||
pub fn user_data_url(uri: &str) -> String {
 | 
			
		||||
    format!("{}{}", conf().storage_url, uri)
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user