diff options
author | Dessalines <happydooby@gmail.com> | 2019-06-01 22:16:31 -0700 |
---|---|---|
committer | Dessalines <happydooby@gmail.com> | 2019-06-01 22:16:31 -0700 |
commit | b45384e13676ba0457f542671e1105c1985ffcba (patch) | |
tree | 452cf12da41c6bc4b7c6c932a84fd2814eb7129b | |
parent | f0e5cce51f5c5aca7d71cdb709b7e2525e49ba63 (diff) |
Fix new user create, no more default community
-rw-r--r-- | server/src/api/user.rs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/server/src/api/user.rs b/server/src/api/user.rs index 9361ca4d..5d957120 100644 --- a/server/src/api/user.rs +++ b/server/src/api/user.rs @@ -161,35 +161,6 @@ impl Perform<LoginResponse> for Oper<Register> { } }; - // Sign them up for main community no matter what - let community_follower_form = CommunityFollowerForm { - community_id: 1, - user_id: inserted_user.id, - }; - - let _inserted_community_follower = match CommunityFollower::follow(&conn, &community_follower_form) { - Ok(user) => user, - Err(_e) => { - return Err(APIError::err(&self.op, "Community follower already exists."))? - } - }; - - // If its an admin, add them as a mod and follower to main - if data.admin { - let community_moderator_form = CommunityModeratorForm { - community_id: 1, - user_id: inserted_user.id, - }; - - let _inserted_community_moderator = match CommunityModerator::join(&conn, &community_moderator_form) { - Ok(user) => user, - Err(_e) => { - return Err(APIError::err(&self.op, "Community moderator already exists."))? - } - }; - - } - // Return the jwt Ok( LoginResponse { |