mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-23 04:53:06 +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,
|
None => user.password_encrypted,
|
||||||
};
|
};
|
||||||
|
|
||||||
let default_listing_type = ListingType::from_str(&data.default_listing_type)? as i16;
|
let default_listing_type = data.default_listing_type;
|
||||||
let default_sort_type = SortType::from_str(&data.default_sort_type)? as i16;
|
let default_sort_type = data.default_sort_type;
|
||||||
|
|
||||||
let user_form = UserForm {
|
let user_form = UserForm {
|
||||||
name: user.name,
|
name: user.name,
|
||||||
|
@ -509,7 +509,7 @@ impl Perform for GetUserDetails {
|
||||||
|
|
||||||
let user_id = user.map(|u| u.id);
|
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 {
|
if user_details_id == auth_user_id {
|
||||||
(
|
(
|
||||||
None,
|
None,
|
||||||
|
@ -591,7 +591,7 @@ impl Perform for GetUserDetails {
|
||||||
// Return the jwt
|
// Return the jwt
|
||||||
Ok(GetUserDetailsResponse {
|
Ok(GetUserDetailsResponse {
|
||||||
user_view,
|
user_view,
|
||||||
user_view_dangerous: user_dangerous,
|
user_view_dangerous,
|
||||||
follows,
|
follows,
|
||||||
moderates,
|
moderates,
|
||||||
comments,
|
comments,
|
||||||
|
|
|
@ -7,4 +7,4 @@ edition = "2018"
|
||||||
lemmy_db_queries = { path = "../lemmy_db_queries" }
|
lemmy_db_queries = { path = "../lemmy_db_queries" }
|
||||||
lemmy_db_schema = { path = "../lemmy_db_schema" }
|
lemmy_db_schema = { path = "../lemmy_db_schema" }
|
||||||
diesel = { version = "1.4.5", features = ["postgres","chrono","r2d2","serde_json"] }
|
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 struct SaveUserSettings {
|
||||||
pub show_nsfw: bool,
|
pub show_nsfw: bool,
|
||||||
pub theme: String,
|
pub theme: String,
|
||||||
pub default_sort_type: String,
|
pub default_sort_type: i16,
|
||||||
pub default_listing_type: String,
|
pub default_listing_type: i16,
|
||||||
pub lang: String,
|
pub lang: String,
|
||||||
pub avatar: Option<String>,
|
pub avatar: Option<String>,
|
||||||
pub banner: Option<String>,
|
pub banner: Option<String>,
|
||||||
|
|
Loading…
Reference in a new issue