Refactor exports controller (#1567)
* Add basic coverage for settings/exports controller * Remove unused @account variable from settings/exports controller * Add coverage for download export actions * Remove deprecated `render :text` in favor of `send_data` for csv downloads * Add model to handle exports * Use Export class in settings/exports controller * Simplify settings/exports controller methods * Move settings/export to more restful routes
This commit is contained in:
parent
1921c5416b
commit
3ddd936b03
10 changed files with 123 additions and 40 deletions
|
@ -53,11 +53,10 @@ Rails.application.routes.draw do
|
|||
resource :preferences, only: [:show, :update]
|
||||
resource :import, only: [:show, :create]
|
||||
|
||||
resource :export, only: [:show] do
|
||||
collection do
|
||||
get :follows, to: 'exports#download_following_list'
|
||||
get :blocks, to: 'exports#download_blocking_list'
|
||||
end
|
||||
resource :export, only: [:show]
|
||||
namespace :exports, constraints: { format: :csv } do
|
||||
resources :follows, only: :index, controller: :following_accounts
|
||||
resources :blocks, only: :index, controller: :blocked_accounts
|
||||
end
|
||||
|
||||
resource :two_factor_auth, only: [:show, :new, :create] do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue