cleanup backend emoji reaction code
This commit is contained in:
parent
a14c84b553
commit
da177d6c9d
4 changed files with 5 additions and 7 deletions
|
@ -8,12 +8,12 @@ class Api::V1::Statuses::ReactionsController < Api::BaseController
|
||||||
before_action :set_reaction, except: :update
|
before_action :set_reaction, except: :update
|
||||||
|
|
||||||
def update
|
def update
|
||||||
StatusReactionService.new.call(current_account, @status, params[:id])
|
ReactService.new.call(current_account, @status, params[:id])
|
||||||
render_empty
|
render_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
StatusUnreactionService.new.call(current_account, @status)
|
UnreactService.new.call(current_account, @status)
|
||||||
render_empty
|
render_empty
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,5 @@ class ActivityPub::EmojiReactionSerializer < ActivityPub::Serializer
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def reaction
|
alias reaction content
|
||||||
content
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusReactionService < BaseService
|
class ReactService < BaseService
|
||||||
include Authorization
|
include Authorization
|
||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class StatusUnreactionService < BaseService
|
class UnreactService < BaseService
|
||||||
include Payloadable
|
include Payloadable
|
||||||
|
|
||||||
def call(account, status)
|
def call(account, status)
|
Loading…
Reference in a new issue