mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2024-11-26 15:29:21 +00:00
Get user virtual directory
This commit is contained in:
parent
eb3e6e9afa
commit
d355f33cb0
@ -13,6 +13,7 @@ pub struct APIUserInfo {
|
|||||||
lastName: String,
|
lastName: String,
|
||||||
publicPage: bool,
|
publicPage: bool,
|
||||||
openPage: bool,
|
openPage: bool,
|
||||||
|
virtualDirectory: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl APIUserInfo {
|
impl APIUserInfo {
|
||||||
@ -23,6 +24,7 @@ impl APIUserInfo {
|
|||||||
lastName: info.last_name,
|
lastName: info.last_name,
|
||||||
publicPage: info.status != UserPageStatus::PRIVATE,
|
publicPage: info.status != UserPageStatus::PRIVATE,
|
||||||
openPage: info.status == UserPageStatus::OPEN,
|
openPage: info.status == UserPageStatus::OPEN,
|
||||||
|
virtualDirectory: info.virtual_directory.unwrap_or("".to_string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,5 +18,6 @@ pub struct User {
|
|||||||
pub password: String,
|
pub password: String,
|
||||||
pub first_name: String,
|
pub first_name: String,
|
||||||
pub last_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")?,
|
first_name: res.get_str("prenom")?,
|
||||||
last_name: res.get_str("nom")?,
|
last_name: res.get_str("nom")?,
|
||||||
status: page_status,
|
status: page_status,
|
||||||
|
virtual_directory: res.get_optional_str("sous_repertoire")?,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user