diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-06-09 14:12:40 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-09 14:12:40 -0400 |
commit | 5282ba862a75cbbec81892a6a4cca7e798850178 (patch) | |
tree | 39f394e4eaedbf882095824a7d21d69749b7b9ea /config | |
parent | 04646029785f25202cfdcb8d5a1d31948244ac7a (diff) |
Move reblogged_by and favourited_by actions out of api/v1/statuses and into unique controllers (#3646)
* Add specs for api statuses routes * Update favourited_by and reblogged_by api routes * Move methods into new controllers * Use load_accounts methods to simplify index actions * Clean up load_accounts methods * Clean up link header generation * Check for link headers in specs * Remove unused actions from api/v1/statuses controller * Remove specs for moved actions
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/routes.rb b/config/routes.rb index f5fc2b5d6..d0236a43a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -128,11 +128,16 @@ Rails.application.routes.draw do # JSON / REST API namespace :v1 do resources :statuses, only: [:create, :show, :destroy] do + scope module: :statuses do + with_options only: :index do + resources :reblogged_by, controller: :reblogged_by_accounts + resources :favourited_by, controller: :favourited_by_accounts + end + end + member do get :context get :card - get :reblogged_by - get :favourited_by post :reblog post :unreblog |