Add sound/show action (FIXME: need tests!)
This commit is contained in:
parent
9ccd1e10be
commit
fc1ec120ae
7
app/controllers/api/sounds_controller.rb
Normal file
7
app/controllers/api/sounds_controller.rb
Normal file
@ -0,0 +1,7 @@
|
||||
class Api::SoundsController < Api::ApplicationController
|
||||
# FIXME: add some tests!
|
||||
def show
|
||||
sound = Sound.find params[:id]
|
||||
send_file sound.path, :type => sound.mime_type
|
||||
end
|
||||
end
|
@ -1,5 +1,6 @@
|
||||
Scube::Application.routes.draw do
|
||||
namespace :api do
|
||||
resources :sounds, :only => [:show]
|
||||
resources :playlists, :only => [:index, :create]
|
||||
resources :sessions, :only => [:create]
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user