1
0
Fork 0
oldhaven/rails/app/controllers/track_controller.rb

12 lines
290 B
Ruby

class TrackController < ApplicationController
def listen
@track = TrackData.where(id: params[:id])
unless @track.empty?
out = {:status => 'ok', :data => @track.first.files.first[1]}
else
out = {:status => 'no_such_track'}
end
render :json => out
end
end