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.

32 lines
848 B

8 years ago
8 years ago
  1. Rails.application.routes.draw do
  2. get '.well-known/host-meta', to: 'xrd#host_meta', as: :host_meta
  3. get '.well-known/webfinger', to: 'xrd#webfinger', as: :webfinger
  4. devise_for :users, path: 'auth', controllers: {
  5. sessions: 'auth/sessions',
  6. registrations: 'auth/registrations',
  7. passwords: 'auth/passwords'
  8. }
  9. resources :accounts, path: 'users', only: [:show], param: :username do
  10. member do
  11. post :follow
  12. post :unfollow
  13. end
  14. resources :stream_entries, path: 'updates', only: [:show] do
  15. member do
  16. post :reblog
  17. post :favourite
  18. end
  19. end
  20. end
  21. namespace :api do
  22. resources :subscriptions, only: [:show]
  23. post '/subscriptions/:id', to: 'subscriptions#update'
  24. post '/salmon/:id', to: 'salmon#update', as: :salmon
  25. end
  26. root 'home#index'
  27. end