Follow fedibird delete emoji-reaction api
This commit is contained in:
parent
b9f8e7731b
commit
0190688af0
@ -5,7 +5,7 @@ class Api::V1::Statuses::EmojiReactionsController < Api::BaseController
|
|||||||
|
|
||||||
before_action -> { doorkeeper_authorize! :write, :'write:emoji_reactions' }
|
before_action -> { doorkeeper_authorize! :write, :'write:emoji_reactions' }
|
||||||
before_action :require_user!
|
before_action :require_user!
|
||||||
before_action :set_status, only: %i(create update)
|
before_action :set_status, only: %i(create update destroy)
|
||||||
before_action :set_status_without_authorize, only: [:destroy]
|
before_action :set_status_without_authorize, only: [:destroy]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
@ -18,7 +18,7 @@ class Api::V1::Statuses::EmojiReactionsController < Api::BaseController
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
emoji = params[:emoji]
|
emoji = params[:emoji] || params[:id]
|
||||||
|
|
||||||
if emoji
|
if emoji
|
||||||
shortcode, domain = emoji.split('@')
|
shortcode, domain = emoji.split('@')
|
||||||
|
@ -32,7 +32,7 @@ namespace :api, format: false do
|
|||||||
|
|
||||||
post :translate, to: 'translations#create'
|
post :translate, to: 'translations#create'
|
||||||
|
|
||||||
resources :emoji_reactions, only: [:create, :update], constraints: { id: /[^\/]+/ }
|
resources :emoji_reactions, only: [:create, :update, :destroy], constraints: { id: /[^\/]+/ }
|
||||||
post :emoji_unreaction, to: 'emoji_reactions#destroy'
|
post :emoji_unreaction, to: 'emoji_reactions#destroy'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user