From 4950e59cdcd59a181238d3d504398de188e19319 Mon Sep 17 00:00:00 2001 From: trwnh Date: Wed, 23 Dec 2020 09:43:38 -0600 Subject: Use existing FeaturedTag serializer and delete AccountFeaturedTag serializer (#15415) * Update featured_tags_controller.rb * Update featured_tag_serializer.rb * Update featured_tag_serializer.rb * Delete account_featured_tag_serializer.rb * please codeclimate * please codeclimate --- app/controllers/api/v1/accounts/featured_tags_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers') 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 -- cgit From 4552449c2658db7fab3a7637af18fca9a4a38657 Mon Sep 17 00:00:00 2001 From: ThibG Date: Wed, 30 Dec 2020 23:19:18 +0100 Subject: Fix profile update not being sent on profile/header picture deletion (#15461) Fixes #15460 Co-authored-by: Claire --- app/controllers/settings/pictures_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'app/controllers') 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 -- cgit