Added start of an API to return some basic stats of the app
This commit is contained in:
19
app/routes/api_v1.rb
Normal file
19
app/routes/api_v1.rb
Normal file
@ -0,0 +1,19 @@
|
||||
class StageManager
|
||||
class ApiV1Controller
|
||||
|
||||
get '/health' do
|
||||
json :status => 'success'
|
||||
end
|
||||
|
||||
get '/channels' do
|
||||
channels = Channel.all().map!(&:to_hash)
|
||||
json channels
|
||||
end
|
||||
|
||||
get '/videos' do
|
||||
videos = Video.all().map!(&:to_hash)
|
||||
json videos
|
||||
end
|
||||
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user