about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2021-01-07 10:25:39 -0600
committerStarfall <us@starfall.systems>2021-01-07 10:25:39 -0600
commit29227b32e150894e15098bcf216b1f5c08763200 (patch)
treeafa3ac9c52a63ca672e619876c84cf59f2dbb36f /app/controllers
parent6ed4e874c5ace36344f77b3f096c4089d9b11e01 (diff)
parentd42e7e01dcd464f80637682d4eee6e5a7f36f26e (diff)
Merge remote-tracking branch 'glitchsoc/master' into main
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api/v1/accounts/featured_tags_controller.rb2
-rw-r--r--app/controllers/settings/pictures_controller.rb8
2 files changed, 7 insertions, 3 deletions
diff --git a/app/controllers/api/v1/accounts/featured_tags_controller.rb b/app/controllers/api/v1/accounts/featured_tags_controller.rb
index dc01b577c..0101fb469 100644
--- a/app/controllers/api/v1/accounts/featured_tags_controller.rb
+++ b/app/controllers/api/v1/accounts/featured_tags_controller.rb
@@ -7,7 +7,7 @@ class Api::V1::Accounts::FeaturedTagsController < Api::BaseController
   respond_to :json
 
   def index
-    render json: @featured_tags, each_serializer: REST::AccountFeaturedTagSerializer
+    render json: @featured_tags, each_serializer: REST::FeaturedTagSerializer
   end
 
   private
diff --git a/app/controllers/settings/pictures_controller.rb b/app/controllers/settings/pictures_controller.rb
index 28df65f8f..58a432530 100644
--- a/app/controllers/settings/pictures_controller.rb
+++ b/app/controllers/settings/pictures_controller.rb
@@ -7,8 +7,12 @@ module Settings
 
     def destroy
       if valid_picture?
-        msg = I18n.t('generic.changes_saved_msg') if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
-        redirect_to settings_profile_path, notice: msg, status: 303
+        if UpdateAccountService.new.call(@account, { @picture => nil, "#{@picture}_remote_url" => '' })
+          ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
+          redirect_to settings_profile_path, notice: I18n.t('generic.changes_saved_msg'), status: 303
+        else
+          redirect_to settings_profile_path
+        end
       else
         bad_request
       end