settings.rb 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # frozen_string_literal: true
  2. namespace :settings do
  3. resource :profile, only: [:show, :update] do
  4. resources :pictures, only: :destroy
  5. end
  6. get :preferences, to: redirect('/settings/preferences/appearance')
  7. namespace :preferences do
  8. resource :appearance, only: [:show, :update], controller: :appearance
  9. resource :notifications, only: [:show, :update]
  10. resource :other, only: [:show, :update], controller: :other
  11. end
  12. resources :imports, only: [:index, :show, :destroy, :create] do
  13. member do
  14. post :confirm
  15. get :failures
  16. end
  17. end
  18. resource :export, only: [:show, :create]
  19. namespace :exports, constraints: { format: :csv } do
  20. resources :follows, only: :index, controller: :following_accounts
  21. resources :blocks, only: :index, controller: :blocked_accounts
  22. resources :mutes, only: :index, controller: :muted_accounts
  23. resources :lists, only: :index, controller: :lists
  24. resources :domain_blocks, only: :index, controller: :blocked_domains
  25. resources :bookmarks, only: :index, controller: :bookmarks
  26. end
  27. resources :two_factor_authentication_methods, only: [:index] do
  28. collection do
  29. post :disable
  30. end
  31. end
  32. resource :otp_authentication, only: [:show, :create], controller: 'two_factor_authentication/otp_authentication'
  33. resources :webauthn_credentials, only: [:index, :new, :create, :destroy],
  34. path: 'security_keys',
  35. controller: 'two_factor_authentication/webauthn_credentials' do
  36. collection do
  37. get :options
  38. end
  39. end
  40. namespace :two_factor_authentication do
  41. resources :recovery_codes, only: [:create]
  42. resource :confirmation, only: [:new, :create]
  43. end
  44. resources :applications, except: [:edit] do
  45. member do
  46. post :regenerate
  47. end
  48. end
  49. resource :delete, only: [:show, :destroy]
  50. resource :migration, only: [:show, :create]
  51. resource :verification, only: :show
  52. namespace :migration do
  53. resource :redirect, only: [:new, :create, :destroy]
  54. end
  55. resources :aliases, only: [:index, :create, :destroy]
  56. resources :sessions, only: [:destroy]
  57. resources :featured_tags, only: [:index, :create, :destroy]
  58. resources :login_activities, only: [:index]
  59. end