about summary refs log tree commit diff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-02-29 19:42:08 +0100
commit0e8f59c16fcb21301c736ecbc4424cb4c5388c42 (patch)
tree344ac1e0b2d165ba4fe3870f786e854710970ce1 /config/routes.rb
parent11ff92c9d7b27c2c9ed86f649aef8d956cc8b989 (diff)
Refactoring Grape API methods into normal controllers & other things
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/config/routes.rb b/config/routes.rb
index 72cfd3e3e..7dd71ec46 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -2,12 +2,15 @@ Rails.application.routes.draw do
   get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta
   get '.well-known/webfinger', to: 'xrd#webfinger', as: :webfinger
 
-  get 'atom/entries/:id', to: 'atom#entry',       as: :atom_entry
-  get 'atom/users/:id',   to: 'atom#user_stream', as: :atom_user_stream
-  get 'users/:name',      to: 'profile#show',     as: :profile
-  get 'users/:name/:id',  to: 'profile#entry',    as: :status
+  resources :accounts, path: 'users', only: [:show], param: :username do
+    resources :stream_entries, path: 'updates', only: [:show]
+  end
 
-  mount Mastodon::API => '/api/'
+  namespace :api do
+    resources :subscriptions, only: [:show]
+    post '/subscriptions/:id', to: 'subscriptions#update'
+    post '/salmon/:id', to: 'salmon#update', as: :salmon
+  end
 
   root 'home#index'
 end