Added start of an API to return some basic stats of the app

This commit is contained in:
2023-03-09 23:43:26 -05:00
parent daa41ac8e4
commit a48ab93b08
2 changed files with 25 additions and 2 deletions

19
app/routes/api_v1.rb Normal file
View 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