Add sound/show action (FIXME: need tests!)

This commit is contained in:
Thibault Jouan 2012-04-19 20:37:00 +00:00
parent 9ccd1e10be
commit fc1ec120ae
2 changed files with 8 additions and 0 deletions

View 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

View File

@ -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]