@@ -117,8 +117,8 @@ defmodule GroupherServer.CMS.Delegate.CommunityOperation do
117
117
|> Multi . run ( :update_community_count , fn _ , % { subscribed_community: community } ->
118
118
CommunityCURD . update_community_count_field ( community , user_id , :subscribers_count , :inc )
119
119
end )
120
- |> Multi . run ( :update_user_subscribe_count , fn _ , _ ->
121
- Accounts . update_subscribe_count ( user_id )
120
+ |> Multi . run ( :update_user_subscribe_state , fn _ , _ ->
121
+ Accounts . update_subscribe_state ( user_id )
122
122
end )
123
123
|> Repo . transaction ( )
124
124
|> result ( )
@@ -137,8 +137,8 @@ defmodule GroupherServer.CMS.Delegate.CommunityOperation do
137
137
|> Multi . run ( :update_community_count , fn _ , % { subscribed_community: community } ->
138
138
CommunityCURD . update_community_count_field ( community , user_id , :subscribers_count , :inc )
139
139
end )
140
- |> Multi . run ( :update_user_subscribe_count , fn _ , _ ->
141
- Accounts . update_subscribe_count ( user_id )
140
+ |> Multi . run ( :update_user_subscribe_state , fn _ , _ ->
141
+ Accounts . update_subscribe_state ( user_id )
142
142
end )
143
143
|> Repo . transaction ( )
144
144
|> result ( )
@@ -158,8 +158,8 @@ defmodule GroupherServer.CMS.Delegate.CommunityOperation do
158
158
|> Multi . run ( :update_community_count , fn _ , _ ->
159
159
CommunityCURD . update_community_count_field ( community , user_id , :subscribers_count , :dec )
160
160
end )
161
- |> Multi . run ( :update_user_subscribe_count , fn _ , _ ->
162
- Accounts . update_subscribe_count ( user_id )
161
+ |> Multi . run ( :update_user_subscribe_state , fn _ , _ ->
162
+ Accounts . update_subscribe_state ( user_id )
163
163
end )
164
164
|> Repo . transaction ( )
165
165
|> result ( )
@@ -186,8 +186,8 @@ defmodule GroupherServer.CMS.Delegate.CommunityOperation do
186
186
|> Multi . run ( :update_community_count , fn _ , _ ->
187
187
CommunityCURD . update_community_count_field ( community , user_id , :subscribers_count , :dec )
188
188
end )
189
- |> Multi . run ( :update_user_subscribe_count , fn _ , _ ->
190
- Accounts . update_subscribe_count ( user_id )
189
+ |> Multi . run ( :update_user_subscribe_state , fn _ , _ ->
190
+ Accounts . update_subscribe_state ( user_id )
191
191
end )
192
192
|> Multi . run ( :update_community_geo , fn _ , _ ->
193
193
update_community_geo ( community_id , user_id , remote_ip , :dec )
@@ -217,8 +217,8 @@ defmodule GroupherServer.CMS.Delegate.CommunityOperation do
217
217
|> Multi . run ( :update_community_count , fn _ , _ ->
218
218
CommunityCURD . update_community_count_field ( community , user_id , :subscribers_count , :dec )
219
219
end )
220
- |> Multi . run ( :update_user_subscribe_count , fn _ , _ ->
221
- Accounts . update_subscribe_count ( user_id )
220
+ |> Multi . run ( :update_user_subscribe_state , fn _ , _ ->
221
+ Accounts . update_subscribe_state ( user_id )
222
222
end )
223
223
|> Multi . run ( :update_community_geo_city , fn _ , _ ->
224
224
update_community_geo_map ( community . id , city , :dec )
0 commit comments