1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 08:25:16 +00:00

Get path to user data files

This commit is contained in:
2020-05-26 18:02:14 +02:00
parent 175266f397
commit 305e836d78
4 changed files with 37 additions and 2 deletions

View File

@ -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;

View 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)
}