1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2025-06-20 08:25:16 +00:00

Can get the list of friends of another user

This commit is contained in:
2020-06-30 07:49:23 +02:00
parent 8c424bcec4
commit 9a3b565f00
4 changed files with 30 additions and 1 deletions

View File

@ -379,6 +379,11 @@ impl HttpRequestHandler {
self.curr_user_id.clone()
}
/// Get current user ID, return invalid user id value if there is none
pub fn user_id_or_invalid(&self) -> UserID {
self.user_id_opt().unwrap_or(UserID::invalid())
}
/// Get an email included in the request
pub fn post_email(&mut self, name: &str) -> ResultBoxError<String> {
let mail = self.post_string(name)?;