headers_controller.rb 475 B

12345678910111213
  1. # frozen_string_literal: true
  2. class Api::V1::Profile::HeadersController < Api::BaseController
  3. before_action -> { doorkeeper_authorize! :write, :'write:accounts' }
  4. before_action :require_user!
  5. def destroy
  6. @account = current_account
  7. UpdateAccountService.new.call(@account, { header: nil }, raise_error: true)
  8. ActivityPub::UpdateDistributionWorker.perform_async(@account.id)
  9. render json: @account, serializer: REST::CredentialAccountSerializer
  10. end
  11. end