about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb21
1 files changed, 20 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 70e252409..bfca5c734 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -24,6 +24,8 @@ Rails.application.routes.draw do
     confirmations:      'auth/confirmations',
   }
 
+  get '/users/:username', to: redirect('/@%{username}'), constraints: { format: :html }
+
   resources :accounts, path: 'users', only: [:show], param: :username do
     resources :stream_entries, path: 'updates', only: [:show] do
       member do
@@ -43,9 +45,20 @@ Rails.application.routes.draw do
     end
   end
 
+  get '/@:username', to: 'accounts#show', as: :short_account
+  get '/@:account_username/:id', to: 'statuses#show', as: :short_account_status
+
   namespace :settings do
     resource :profile, only: [:show, :update]
     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
+    end
 
     resource :two_factor_auth, only: [:show] do
       member do
@@ -122,13 +135,18 @@ Rails.application.routes.draw do
       get '/timelines/public',   to: 'timelines#public', as: :public_timeline
       get '/timelines/tag/:id',  to: 'timelines#tag', as: :hashtag_timeline
 
+      get '/search', to: 'search#index', as: :search
+
       resources :follows,    only: [:create]
       resources :media,      only: [:create]
       resources :apps,       only: [:create]
       resources :blocks,     only: [:index]
+      resources :mutes,      only: [:index]
       resources :favourites, only: [:index]
       resources :reports,    only: [:index, :create]
 
+      resource :instance, only: [:show]
+
       resources :follow_requests, only: [:index] do
         member do
           post :authorize
@@ -151,7 +169,6 @@ Rails.application.routes.draw do
 
         member do
           get :statuses
-          get 'statuses/media', to: 'accounts#media_statuses', as: :media_statuses
           get :followers
           get :following
 
@@ -159,6 +176,8 @@ Rails.application.routes.draw do
           post :unfollow
           post :block
           post :unblock
+          post :mute
+          post :unmute
         end
       end
     end