about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-07-17 13:49:29 +0200
committerGitHub <noreply@github.com>2022-07-17 13:49:29 +0200
commitc3f0621a59a74d0e20e6db6170894871c48e8f0f (patch)
treedf58568b5fbb86042f9dad4ba772f47d305e6086 /config/routes.rb
parentecb3bb3256fe1bab0d7a63829cdce914b2b509a9 (diff)
Add ability to follow hashtags (#18809)
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 177c1cff4..7a902b1f0 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -530,6 +530,15 @@ Rails.application.routes.draw do
         resource :note, only: :create, controller: 'accounts/notes'
       end
 
+      resources :tags, only: [:show], constraints: { id: /#{Tag::HASHTAG_NAME_RE}/ } do
+        member do
+          post :follow
+          post :unfollow
+        end
+      end
+
+      resources :followed_tags, only: [:index]
+
       resources :lists, only: [:index, :create, :show, :update, :destroy] do
         resource :accounts, only: [:show, :create, :destroy], controller: 'lists/accounts'
       end