diff options
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 45 |
1 files changed, 36 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb index e78a2c4d0..c9962dd7d 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -35,6 +35,9 @@ Rails.application.routes.draw do get 'intent', to: 'intents#show' get 'custom.css', to: 'custom_css#show', as: :custom_css + get '/custom/:id/profile.css', to: 'user_profile_css#show', as: :user_profile_css + get '/custom/:id/webapp.css', to: 'user_webapp_css#show', as: :user_webapp_css + resource :instance_actor, path: 'actor', only: [:show] do resource :inbox, only: [:create], module: :activitypub resource :outbox, only: [:show], module: :activitypub @@ -89,8 +92,11 @@ Rails.application.routes.draw do resource :inbox, only: [:create], module: :activitypub get '/@:username', to: 'accounts#show', as: :short_account + get '/@:username/threads', to: 'accounts#show', as: :short_account_threads get '/@:username/with_replies', to: 'accounts#show', as: :short_account_with_replies get '/@:username/media', to: 'accounts#show', as: :short_account_media + get '/@:username/reblogs', to: 'accounts#show', as: :short_account_reblogs + get '/@:username/mentions', to: 'accounts#show', as: :short_account_mentions get '/@:username/tagged/:tag', to: 'accounts#show', as: :short_account_tag get '/@:account_username/:id', to: 'statuses#show', as: :short_account_status get '/@:account_username/:id/embed', to: 'statuses#embed', as: :embed_short_account_status @@ -114,6 +120,9 @@ Rails.application.routes.draw do resource :appearance, only: [:show, :update], controller: :appearance resource :notifications, only: [:show, :update] resource :other, only: [:show, :update], controller: :other + resource :filters, only: [:show, :update], controller: :filters + resource :publishing, only: [:show, :update], controller: :publishing + resource :privacy, only: [:show, :update], controller: :privacy end resource :import, only: [:show, :create] @@ -181,6 +190,12 @@ Rails.application.routes.draw do resources :filters, except: [:show] resource :relationships, only: [:show, :update] + resources :custom_emojis, only: [:index, :new, :create] do + collection do + post :batch + end + end + get '/public', to: 'public_timelines#show', as: :public_timeline get '/media_proxy/:id/(*any)', to: 'media_proxy#show', as: :media_proxy @@ -281,12 +296,6 @@ Rails.application.routes.draw do resource :two_factor_authentication, only: [:destroy] 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 @@ -315,7 +324,7 @@ Rails.application.routes.draw do # JSON / REST API namespace :v1 do - resources :statuses, only: [:create, :show, :destroy] do + resources :statuses, only: [:create, :update, :show, :destroy] do scope module: :statuses do resources :reblogged_by, controller: :reblogged_by_accounts, only: :index resources :favourited_by, controller: :favourited_by_accounts, only: :index @@ -328,11 +337,16 @@ Rails.application.routes.draw do resource :bookmark, only: :create post :unbookmark, to: 'bookmarks#destroy' - resource :mute, only: :create + resource :mute, only: [:create, :update] post :unmute, to: 'mutes#destroy' resource :pin, only: :create post :unpin, to: 'pins#destroy' + + resource :hide, only: :create + post :unhide, to: 'mutes#destroy' + + resource :publish, only: :create end member do @@ -412,6 +426,8 @@ Rails.application.routes.draw do resource :domain_blocks, only: [:show, :create, :destroy] resource :directory, only: [:show] + resource :domain_permissions, only: [:show, :create, :update, :destroy] + resources :follow_requests, only: [:index] do member do post :authorize @@ -491,6 +507,9 @@ Rails.application.routes.draw do resource :action, only: [:create], controller: 'account_actions' end + resource :domain_blocks, only: [:show] + resource :domain_allows, only: [:show] + resources :reports, only: [:index, :show] do member do post :assign_to_self @@ -518,10 +537,18 @@ Rails.application.routes.draw do end end + namespace :matrix, path: '_matrix-internal' do + namespace :identity do + namespace :v1 do + resource :check_credentials, only: [:create] + end + end + end + get '/web/(*any)', to: 'home#index', as: :web get '/about', to: 'about#show' - get '/about/more', to: 'about#more' + get '/about/more', to: redirect('/about') get '/terms', to: 'about#terms' match '/', via: [:post, :put, :patch, :delete], to: 'application#raise_not_found', format: false |