cleanup backend emoji reaction code

This commit is contained in:
fef 2022-11-29 08:15:52 +00:00 committed by Jeremy Kescher
parent 4653f9830d
commit 42490e21f8
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4
4 changed files with 5 additions and 7 deletions

View file

@ -8,12 +8,12 @@ class Api::V1::Statuses::ReactionsController < Api::BaseController
before_action :set_reaction, except: :update
def update
StatusReactionService.new.call(current_account, @status, params[:id])
ReactService.new.call(current_account, @status, params[:id])
render_empty
end
def destroy
StatusUnreactionService.new.call(current_account, @status)
UnreactService.new.call(current_account, @status)
render_empty
end

View file

@ -30,7 +30,5 @@ class ActivityPub::EmojiReactionSerializer < ActivityPub::Serializer
end
end
def reaction
content
end
alias reaction content
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class StatusReactionService < BaseService
class ReactService < BaseService
include Authorization
include Payloadable

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class StatusUnreactionService < BaseService
class UnreactService < BaseService
include Payloadable
def call(account, status)