mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-12-28 14:38:52 +00:00
Get user virtual directory
This commit is contained in:
parent
eb3e6e9afa
commit
d355f33cb0
@ -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")?,
|
||||
})
|
||||
})
|
||||
}
|
Loading…
Reference in New Issue
Block a user