limit: Option<i64>,
community_id: Option<i32>,
saved_only: bool,
+ auth: Option<String>,
}
#[derive(Serialize, Deserialize)]
let conn = establish_connection();
+ let user_id: Option<i32> = match &self.auth {
+ Some(auth) => {
+ match Claims::decode(&auth) {
+ Ok(claims) => {
+ let user_id = claims.claims.id;
+ Some(user_id)
+ }
+ Err(_e) => None
+ }
+ }
+ None => None
+ };
+
//TODO add save
let sort = SortType::from_str(&self.sort)?;
self.community_id,
Some(user_details_id),
None,
- None,
+ user_id,
self.saved_only,
false,
self.page,
None,
Some(user_details_id),
None,
- None,
+ user_id,
self.saved_only,
self.page,
self.limit)?
}
public getUserDetails(form: GetUserDetailsForm) {
+ this.setAuth(form, false);
this.subject.next(this.wsSendWrapper(UserOperation.GetUserDetails, form));
}