mirror of
https://gitlab.com/comunic/comunicapiv3
synced 2025-06-20 08:25:16 +00:00
Can respond to a friendship request
This commit is contained in:
@ -384,6 +384,14 @@ impl HttpRequestHandler {
|
||||
self.user_id_opt().unwrap_or(UserID::invalid())
|
||||
}
|
||||
|
||||
/// Get user ID as a reference
|
||||
pub fn user_id_ref(&self) -> ResultBoxError<&UserID> {
|
||||
match self.curr_user_id.as_ref() {
|
||||
Some(s) => Ok(s),
|
||||
None => Err(ExecError::boxed_new("Could not get required 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)?;
|
||||
|
Reference in New Issue
Block a user