mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-26 06:11:26 +00:00
Changing default_sort and listing back to numbers.
This commit is contained in:
parent
9ab3a9d072
commit
418eb8025c
3 changed files with 7 additions and 7 deletions
|
@ -414,8 +414,8 @@ impl Perform for SaveUserSettings {
|
|||
None => user.password_encrypted,
|
||||
};
|
||||
|
||||
let default_listing_type = ListingType::from_str(&data.default_listing_type)? as i16;
|
||||
let default_sort_type = SortType::from_str(&data.default_sort_type)? as i16;
|
||||
let default_listing_type = data.default_listing_type;
|
||||
let default_sort_type = data.default_sort_type;
|
||||
|
||||
let user_form = UserForm {
|
||||
name: user.name,
|
||||
|
@ -509,7 +509,7 @@ impl Perform for GetUserDetails {
|
|||
|
||||
let user_id = user.map(|u| u.id);
|
||||
|
||||
let (user_view, user_dangerous) = if let Some(auth_user_id) = user_id {
|
||||
let (user_view, user_view_dangerous) = if let Some(auth_user_id) = user_id {
|
||||
if user_details_id == auth_user_id {
|
||||
(
|
||||
None,
|
||||
|
@ -591,7 +591,7 @@ impl Perform for GetUserDetails {
|
|||
// Return the jwt
|
||||
Ok(GetUserDetailsResponse {
|
||||
user_view,
|
||||
user_view_dangerous: user_dangerous,
|
||||
user_view_dangerous,
|
||||
follows,
|
||||
moderates,
|
||||
comments,
|
||||
|
|
|
@ -48,8 +48,8 @@ pub struct CaptchaResponse {
|
|||
pub struct SaveUserSettings {
|
||||
pub show_nsfw: bool,
|
||||
pub theme: String,
|
||||
pub default_sort_type: String,
|
||||
pub default_listing_type: String,
|
||||
pub default_sort_type: i16,
|
||||
pub default_listing_type: i16,
|
||||
pub lang: String,
|
||||
pub avatar: Option<String>,
|
||||
pub banner: Option<String>,
|
||||
|
|
Loading…
Reference in a new issue