mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-23 17:54:21 +00:00
Changing default_sort and listing back to numbers.
This commit is contained in:
parent
9ab3a9d072
commit
418eb8025c
|
@ -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,
|
||||
|
|
|
@ -7,4 +7,4 @@ edition = "2018"
|
|||
lemmy_db_queries = { path = "../lemmy_db_queries" }
|
||||
lemmy_db_schema = { path = "../lemmy_db_schema" }
|
||||
diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
serde = { version = "1.0.118", features = ["derive"] }
|
||||
|
|
|
@ -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