summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-10-15 15:10:42 -0700
committerDessalines <tyhou13@gmx.com>2019-10-15 15:10:42 -0700
commit536313889df211391a0a5ba004c7b170c8012589 (patch)
tree0d3dfe0671916abe87bb901794b85ecaec7961fc /server
parent903d73d66535adf8ad8fbe460b00d2e14227e5e7 (diff)
Running cargo fmt.
Diffstat (limited to 'server')
-rw-r--r--server/src/api/user.rs28
-rw-r--r--server/src/schema.rs48
2 files changed, 50 insertions, 26 deletions
diff --git a/server/src/api/user.rs b/server/src/api/user.rs
index 2fc0a92c..b0ed5a4b 100644
--- a/server/src/api/user.rs
+++ b/server/src/api/user.rs
@@ -602,7 +602,17 @@ impl Perform<LoginResponse> for Oper<DeleteAccount> {
let user_id = claims.id;
// Comments
- let comments = CommentView::list(&conn, &SortType::New, None, Some(user_id), None, None, false, None, Some(std::i64::MAX))?;
+ let comments = CommentView::list(
+ &conn,
+ &SortType::New,
+ None,
+ Some(user_id),
+ None,
+ None,
+ false,
+ None,
+ Some(std::i64::MAX),
+ )?;
for comment in &comments {
let comment_form = CommentForm {
@@ -623,7 +633,21 @@ impl Perform<LoginResponse> for Oper<DeleteAccount> {
}
// Posts
- let posts = PostView::list(&conn, PostListingType::All, &SortType::New,None, Some(user_id), None, None, None, true, false, false, None, Some(std::i64::MAX))?;
+ let posts = PostView::list(
+ &conn,
+ PostListingType::All,
+ &SortType::New,
+ None,
+ Some(user_id),
+ None,
+ None,
+ None,
+ true,
+ false,
+ false,
+ None,
+ Some(std::i64::MAX),
+ )?;
for post in &posts {
let post_form = PostForm {
diff --git a/server/src/schema.rs b/server/src/schema.rs
index ff56467b..b4e16d13 100644
--- a/server/src/schema.rs
+++ b/server/src/schema.rs
@@ -305,28 +305,28 @@ joinable!(site -> user_ (creator_id));
joinable!(user_ban -> user_ (user_id));
allow_tables_to_appear_in_same_query!(
- category,
- comment,
- comment_like,
- comment_saved,
- community,
- community_follower,
- community_moderator,
- community_user_ban,
- mod_add,
- mod_add_community,
- mod_ban,
- mod_ban_from_community,
- mod_lock_post,
- mod_remove_comment,
- mod_remove_community,
- mod_remove_post,
- mod_sticky_post,
- post,
- post_like,
- post_read,
- post_saved,
- site,
- user_,
- user_ban,
+ category,
+ comment,
+ comment_like,
+ comment_saved,
+ community,
+ community_follower,
+ community_moderator,
+ community_user_ban,
+ mod_add,
+ mod_add_community,
+ mod_ban,
+ mod_ban_from_community,
+ mod_lock_post,
+ mod_remove_comment,
+ mod_remove_community,
+ mod_remove_post,
+ mod_sticky_post,
+ post,
+ post_like,
+ post_read,
+ post_saved,
+ site,
+ user_,
+ user_ban,
);