mirror of
				https://gitlab.com/comunic/comunicapiv3
				synced 2025-11-04 09:34:04 +00:00 
			
		
		
		
	Get user virtual directory
This commit is contained in:
		@@ -13,6 +13,7 @@ pub struct APIUserInfo {
 | 
			
		||||
    lastName: String,
 | 
			
		||||
    publicPage: bool,
 | 
			
		||||
    openPage: bool,
 | 
			
		||||
    virtualDirectory: String,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl APIUserInfo {
 | 
			
		||||
@@ -23,6 +24,7 @@ impl APIUserInfo {
 | 
			
		||||
            lastName: info.last_name,
 | 
			
		||||
            publicPage: info.status != UserPageStatus::PRIVATE,
 | 
			
		||||
            openPage: info.status == UserPageStatus::OPEN,
 | 
			
		||||
            virtualDirectory: info.virtual_directory.unwrap_or("".to_string())
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
@@ -18,5 +18,6 @@ pub struct User {
 | 
			
		||||
    pub password: String,
 | 
			
		||||
    pub first_name: String,
 | 
			
		||||
    pub last_name: String,
 | 
			
		||||
    pub status: UserPageStatus
 | 
			
		||||
    pub status: UserPageStatus,
 | 
			
		||||
    pub virtual_directory: Option<String>,
 | 
			
		||||
}
 | 
			
		||||
@@ -40,6 +40,7 @@ fn exec_get_user_query(query: database::QueryInfo) -> ResultBoxError<User> {
 | 
			
		||||
            first_name: res.get_str("prenom")?,
 | 
			
		||||
            last_name: res.get_str("nom")?,
 | 
			
		||||
            status: page_status,
 | 
			
		||||
            virtual_directory: res.get_optional_str("sous_repertoire")?,
 | 
			
		||||
        })
 | 
			
		||||
    })
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user