about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-06 12:51:55 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-06 12:51:55 +0100
commitc605b828b53165cb0161a1885e03202013b63f52 (patch)
treea667e98afc79ca3eaa49f46955529f4dc5f2f101 /config
parentaab330eb2d39711e19753e89ba7ff67521929cf0 (diff)
Adding routes to follow, unfollow, favourite and reblog (locally known models)
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 8014a2fb2..3167cbdeb 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -9,7 +9,17 @@ Rails.application.routes.draw do
   }
 
   resources :accounts, path: 'users', only: [:show], param: :username do
-    resources :stream_entries, path: 'updates', only: [:show]
+    member do
+      post :follow
+      post :unfollow
+    end
+
+    resources :stream_entries, path: 'updates', only: [:show] do
+      member do
+        post :reblog
+        post :favourite
+      end
+    end
   end
 
   namespace :api do