1
0

settings.rb 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. resource :privacy, only: [:show, :update], controller: 'privacy'
  53. namespace :migration do
  54. resource :redirect, only: [:new, :create, :destroy]
  55. end
  56. resources :aliases, only: [:index, :create, :destroy]
  57. resources :sessions, only: [:destroy]
  58. resources :featured_tags, only: [:index, :create, :destroy]
  59. resources :login_activities, only: [:index]
  60. end