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:
parent
067669d62b
commit
a23319bf00
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user