1
0
mirror of https://github.com/danbee/mpd-client synced 2025-03-04 08:39:09 +00:00

Add queue endpoint.

This commit is contained in:
Dan Barber 2013-10-17 11:25:35 +01:00
parent 067669d62b
commit a23319bf00

View File

@ -7,6 +7,7 @@ require 'cgi'
require './models/album'
require './models/artist'
require './models/song'
class MPDClient < Sinatra::Base
register Sinatra::Namespace
@ -33,6 +34,10 @@ class MPDClient < Sinatra::Base
JSON Artist.all.map(&:to_h)
end
get '/queue' do
JSON Song.queue.map(&:to_h)
end
end
end