about summary refs log tree commit diff
path: root/config
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-28 13:36:47 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-28 13:36:47 +0100
commit2d2c81765b0a68446a94a7fcba34758a3aa886c0 (patch)
tree0a0610b95195120bd334ad96f2f308a3bb30295a /config
parent26287b6e7dd68e03d6f2d6a7051bb9873e3f6c9a (diff)
Adding embedded PuSH server
Diffstat (limited to 'config')
-rw-r--r--config/routes.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb
index e0c14b47a..5c6568298 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,7 +1,9 @@
+# frozen_string_literal: true
+
 require 'sidekiq/web'
 
 Rails.application.routes.draw do
-  mount ActionCable.server => '/cable'
+  mount ActionCable.server, at: 'cable'
 
   authenticate :user, lambda { |u| u.admin? } do
     mount Sidekiq::Web, at: 'sidekiq'
@@ -19,7 +21,7 @@ Rails.application.routes.draw do
     sessions:           'auth/sessions',
     registrations:      'auth/registrations',
     passwords:          'auth/passwords',
-    confirmations:      'auth/confirmations'
+    confirmations:      'auth/confirmations',
   }
 
   resources :accounts, path: 'users', only: [:show], param: :username do
@@ -43,10 +45,13 @@ Rails.application.routes.draw do
   resources :tags,  only: [:show]
 
   namespace :api do
-    # PubSubHubbub
+    # PubSubHubbub outgoing subscriptions
     resources :subscriptions, only: [:show]
     post '/subscriptions/:id', to: 'subscriptions#update'
 
+    # PubSubHubbub incoming subscriptions
+    post '/push', to: 'push#update', as: :push
+
     # Salmon
     post '/salmon/:id', to: 'salmon#update', as: :salmon