Move reaction endpoints from route.rb to api.rb
This commit is contained in:
parent
20da97252d
commit
c4d82b4170
|
@ -16,6 +16,11 @@ namespace :api, format: false do
|
|||
resource :favourite, only: :create
|
||||
post :unfavourite, to: 'favourites#destroy'
|
||||
|
||||
# foreign custom emojis are encoded as shortcode@domain.tld
|
||||
# the constraint prevents rails from interpreting the ".tld" as a filename extension
|
||||
post '/react/:id', to: 'reactions#create', constraints: { id: /[^\/]+/ }
|
||||
post '/unreact/:id', to: 'reactions#destroy', constraints: { id: /[^\/]+/ }
|
||||
|
||||
resource :bookmark, only: :create
|
||||
post :unbookmark, to: 'bookmarks#destroy'
|
||||
|
||||
|
@ -27,6 +32,7 @@ namespace :api, format: false do
|
|||
|
||||
resource :history, only: :show
|
||||
resource :source, only: :show
|
||||
resources :reactions, only: [:update, :destroy]
|
||||
|
||||
post :translate, to: 'translations#create'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue