mirror of
https://github.com/lunaisnotaboy/mastodon.git
synced 2024-11-16 03:43:08 +00:00
d77fbbed73
Conflicts: - `.github/dependabot.yml`: Upstream made changes, but we had removed it. Discarded upstream changes. - `.rubocop_todo.yml`: Upstream regenerated the file, we had some glitch-soc-specific ignores. - `app/models/account_statuses_filter.rb`: Minor upstream code style change where glitch-soc had slightly different code due to handling of local-only posts. Updated to match upstream's code style. - `app/models/status.rb`: Upstream moved ActiveRecord callback definitions, glitch-soc had an extra one. Moved the definitions as upstream did. - `app/services/backup_service.rb`: Upstream rewrote a lot of the backup service, glitch-soc had changes because of exporting local-only posts. Took upstream changes and added back code to deal with local-only posts. - `config/routes.rb`: Upstream split the file into different files, while glitch-soc had a few extra routes. Extra routes added to `config/routes/settings.rb`, `config/routes/api.rb` and `config/routes/admin.rb` - `db/schema.rb`: Upstream has new migrations, while glitch-soc had an extra migration. Updated the expected serial number to match upstream's. - `lib/mastodon/version.rb`: Upstream added support to set version tags from environment variables, while glitch-soc has an extra `+glitch` tag. Changed the code to support upstream's feature but prepending a `+glitch`. - `spec/lib/activitypub/activity/create_spec.rb`: Minor code style change upstream, while glitch-soc has extra tests due to `directMessage` handling. Applied upstream's changes while keeping glitch-soc's extra tests. - `spec/models/concerns/account_interactions_spec.rb`: Minor code style change upstream, while glitch-soc has extra tests. Applied upstream's changes while keeping glitch-soc's extra tests.
206 lines
4.7 KiB
Ruby
206 lines
4.7 KiB
Ruby
# frozen_string_literal: true
|
|
|
|
namespace :admin do
|
|
get '/dashboard', to: 'dashboard#index'
|
|
|
|
resources :domain_allows, only: [:new, :create, :show, :destroy]
|
|
resources :domain_blocks, only: [:new, :create, :destroy, :update, :edit] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :export_domain_allows, only: [:new] do
|
|
collection do
|
|
get :export, constraints: { format: :csv }
|
|
post :import
|
|
end
|
|
end
|
|
|
|
resources :export_domain_blocks, only: [:new] do
|
|
collection do
|
|
get :export, constraints: { format: :csv }
|
|
post :import
|
|
end
|
|
end
|
|
|
|
resources :email_domain_blocks, only: [:index, :new, :create] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :action_logs, only: [:index]
|
|
resources :warning_presets, except: [:new]
|
|
|
|
resources :announcements, except: [:show] do
|
|
member do
|
|
post :publish
|
|
post :unpublish
|
|
end
|
|
end
|
|
|
|
get '/settings', to: redirect('/admin/settings/branding')
|
|
get '/settings/edit', to: redirect('/admin/settings/branding')
|
|
|
|
namespace :settings do
|
|
resource :branding, only: [:show, :update], controller: 'branding'
|
|
resource :registrations, only: [:show, :update], controller: 'registrations'
|
|
resource :content_retention, only: [:show, :update], controller: 'content_retention'
|
|
resource :about, only: [:show, :update], controller: 'about'
|
|
resource :appearance, only: [:show, :update], controller: 'appearance'
|
|
resource :discovery, only: [:show, :update], controller: 'discovery'
|
|
resource :other, only: [:show, :update], controller: 'other'
|
|
end
|
|
|
|
resources :site_uploads, only: [:destroy]
|
|
|
|
resources :invites, only: [:index, :create, :destroy] do
|
|
collection do
|
|
post :deactivate_all
|
|
end
|
|
end
|
|
|
|
resources :relays, only: [:index, :new, :create, :destroy] do
|
|
member do
|
|
post :enable
|
|
post :disable
|
|
end
|
|
end
|
|
|
|
resources :instances, only: [:index, :show, :destroy], constraints: { id: %r{[^/]+} } do
|
|
member do
|
|
post :clear_delivery_errors
|
|
post :restart_delivery
|
|
post :stop_delivery
|
|
end
|
|
end
|
|
|
|
resources :rules
|
|
|
|
resources :webhooks do
|
|
member do
|
|
post :enable
|
|
post :disable
|
|
end
|
|
|
|
resource :secret, only: [], controller: 'webhooks/secrets' do
|
|
post :rotate
|
|
end
|
|
end
|
|
|
|
resources :reports, only: [:index, :show] do
|
|
resources :actions, only: [:create], controller: 'reports/actions' do
|
|
collection do
|
|
post :preview
|
|
end
|
|
end
|
|
|
|
member do
|
|
post :assign_to_self
|
|
post :unassign
|
|
post :reopen
|
|
post :resolve
|
|
end
|
|
end
|
|
|
|
resources :report_notes, only: [:create, :destroy]
|
|
|
|
resources :accounts, only: [:index, :show, :destroy] do
|
|
member do
|
|
post :enable
|
|
post :unsensitive
|
|
post :unsilence
|
|
post :unsuspend
|
|
post :redownload
|
|
post :remove_avatar
|
|
post :remove_header
|
|
post :memorialize
|
|
post :approve
|
|
post :reject
|
|
post :unblock_email
|
|
end
|
|
|
|
collection do
|
|
post :batch
|
|
end
|
|
|
|
resource :change_email, only: [:show, :update]
|
|
resource :reset, only: [:create]
|
|
resource :action, only: [:new, :create], controller: 'account_actions'
|
|
|
|
resources :statuses, only: [:index, :show] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :relationships, only: [:index]
|
|
|
|
resource :confirmation, only: [:create] do
|
|
collection do
|
|
post :resend
|
|
end
|
|
end
|
|
end
|
|
|
|
resources :users, only: [] do
|
|
resource :two_factor_authentication, only: [:destroy], controller: 'users/two_factor_authentications'
|
|
resource :role, only: [:show, :update], controller: 'users/roles'
|
|
end
|
|
|
|
resources :custom_emojis, only: [:index, :new, :create] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :ip_blocks, only: [:index, :new, :create] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :roles, except: [:show]
|
|
resources :account_moderation_notes, only: [:create, :destroy]
|
|
resource :follow_recommendations, only: [:show, :update]
|
|
resources :tags, only: [:show, :update]
|
|
|
|
namespace :trends do
|
|
resources :links, only: [:index] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :tags, only: [:index] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
resources :statuses, only: [:index] do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
|
|
namespace :links do
|
|
resources :preview_card_providers, only: [:index], path: :publishers do
|
|
collection do
|
|
post :batch
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
namespace :disputes do
|
|
resources :appeals, only: [:index] do
|
|
member do
|
|
post :approve
|
|
post :reject
|
|
end
|
|
end
|
|
end
|
|
end
|