mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Get path to user data files
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
use crate::utils::user_data_utils::user_data_url;
|
||||
|
||||
///! User information
|
||||
///!
|
||||
///! @author Pierre Hubert
|
||||
@ -30,4 +32,18 @@ pub struct User {
|
||||
pub virtual_directory: Option<String>,
|
||||
pub account_image_path: Option<String>,
|
||||
pub account_image_visibility: AccountImageVisibility,
|
||||
}
|
||||
|
||||
impl User {
|
||||
|
||||
/// Get the URL pointing to the default account image
|
||||
pub fn default_account_image_url() -> String {
|
||||
user_data_url(crate::constants::DEFAULT_ACCOUNT_IMAGE)
|
||||
}
|
||||
|
||||
/// Get the URL pointing to the error account image, when the user is not allowed to see user
|
||||
/// account image
|
||||
pub fn error_account_image_url() -> String {
|
||||
user_data_url(crate::constants::ERROR_ACCOUNT_IMAGE)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user