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