2012-08-26 00:48:13 +04:00
|
|
|
BeatHaven::Application.routes.draw do
|
2012-08-27 03:53:30 +04:00
|
|
|
namespace :api do
|
|
|
|
resources :artists, only: [:show], constraints: { id: /.+/ }
|
2012-09-01 21:55:01 +04:00
|
|
|
resources :albums, only: [:show, :picture] do
|
2012-08-27 03:53:30 +04:00
|
|
|
member { get :picture }
|
|
|
|
end
|
2012-09-01 21:55:01 +04:00
|
|
|
resources :search, only: [] do
|
|
|
|
collection { get :complete; get :wtfis }
|
|
|
|
end
|
2012-09-02 02:03:19 +04:00
|
|
|
resources :session, only: [] do
|
|
|
|
collection { post :auth }
|
|
|
|
end
|
2012-08-27 03:53:30 +04:00
|
|
|
end
|
|
|
|
|
2012-09-01 21:55:01 +04:00
|
|
|
match "/:path" => "application#main", constraints: { path: /.*/ }
|
2012-08-27 03:53:30 +04:00
|
|
|
root to: "application#main"
|
2012-08-26 00:48:13 +04:00
|
|
|
end
|