mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 16:35:17 +00:00
Ready to implement account image visibility
This commit is contained in:
@ -256,6 +256,11 @@ impl HttpRequestHandler {
|
||||
}
|
||||
}
|
||||
|
||||
/// Get a user ID, if available
|
||||
pub fn user_id_opt(&self) -> Option<UserID> {
|
||||
self.curr_user_id
|
||||
}
|
||||
|
||||
/// Get an email included in the request
|
||||
pub fn post_email(&mut self, name: &str) -> ResultBoxError<String> {
|
||||
let mail = self.post_string(name)?;
|
||||
|
@ -11,6 +11,14 @@ pub enum UserPageStatus {
|
||||
PRIVATE
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
#[allow(non_camel_case_types)]
|
||||
pub enum AccountImageVisibility {
|
||||
FRIENDS,
|
||||
COMUNIC_USERS,
|
||||
EVERYONE
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct User {
|
||||
pub id: UserID,
|
||||
@ -20,4 +28,6 @@ pub struct User {
|
||||
pub last_name: String,
|
||||
pub status: UserPageStatus,
|
||||
pub virtual_directory: Option<String>,
|
||||
pub account_image_path: Option<String>,
|
||||
pub account_image_visibility: AccountImageVisibility,
|
||||
}
|
Reference in New Issue
Block a user