You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.2 KiB

8 years ago
8 years ago
  1. Rails.application.routes.draw do
  2. use_doorkeeper
  3. get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta
  4. get '.well-known/webfinger', to: 'xrd#webfinger', as: :webfinger
  5. devise_for :users, path: 'auth', controllers: {
  6. sessions: 'auth/sessions',
  7. registrations: 'auth/registrations',
  8. passwords: 'auth/passwords'
  9. }
  10. resources :accounts, path: 'users', only: [:show], param: :username do
  11. resources :stream_entries, path: 'updates', only: [:show]
  12. end
  13. namespace :api do
  14. # PubSubHubbub
  15. resources :subscriptions, only: [:show]
  16. post '/subscriptions/:id', to: 'subscriptions#update'
  17. # Salmon
  18. post '/salmon/:id', to: 'salmon#update', as: :salmon
  19. # JSON / REST API
  20. resources :statuses, only: [:create, :show] do
  21. collection do
  22. get :home
  23. get :mentions
  24. end
  25. member do
  26. post :reblog
  27. post :favourite
  28. end
  29. end
  30. resources :follows, only: [:create]
  31. resources :accounts, only: [:show] do
  32. member do
  33. get :statuses
  34. get :followers
  35. get :following
  36. post :follow
  37. post :unfollow
  38. end
  39. end
  40. end
  41. root 'home#index'
  42. end