api: add the rest of the fields to User
This commit is contained in:
committed by
nitnelave
parent
a1f40a32a5
commit
848cc86d73
@@ -145,6 +145,22 @@ impl<Handler: BackendHandler + Sync> User<Handler> {
|
||||
&self.user.email
|
||||
}
|
||||
|
||||
fn display_name(&self) -> Option<&String> {
|
||||
self.user.display_name.as_ref()
|
||||
}
|
||||
|
||||
fn first_name(&self) -> Option<&String> {
|
||||
self.user.first_name.as_ref()
|
||||
}
|
||||
|
||||
fn last_name(&self) -> Option<&String> {
|
||||
self.user.last_name.as_ref()
|
||||
}
|
||||
|
||||
fn creation_date(&self) -> chrono::NaiveDateTime {
|
||||
self.user.creation_date
|
||||
}
|
||||
|
||||
/// The groups to which this user belongs.
|
||||
async fn groups(&self, context: &Context<Handler>) -> FieldResult<Vec<Group<Handler>>> {
|
||||
Ok(context
|
||||
|
||||
Reference in New Issue
Block a user