0
0
Fork 0

API pagination for all collections using Link header

This commit is contained in:
Eugen Rochko 2016-11-09 17:48:44 +01:00
parent 8d7fc5da6c
commit b13e7dda1f
13 changed files with 123 additions and 63 deletions

View file

@ -67,14 +67,10 @@ Rails.application.routes.draw do
end
end
resources :timelines, only: [] do
collection do
get :home
get :mentions
get :public
get '/tag/:id', action: :tag
end
end
get '/timelines/home', to: 'timelines#home', as: :home_timeline
get '/timelines/mentions', to: 'timelines#mentions', as: :mentions_timeline
get '/timelines/public', to: 'timelines#public', as: :public_timeline
get '/timelines/tag/:id', to: 'timelines#tag', as: :hashtag_timeline
resources :follows, only: [:create]
resources :media, only: [:create]