stage-manager/app/routes/index.rb

21 lines
534 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class StageManager
# Controller to handle top-level pages
class IndexController
get '/' do
channels = Channel.reverse(:updated_at).limit(10).all()
videos = Video.reverse(:updated_at).limit(10).all()
active_projects = Video.where(starred: true).reverse(:updated_at).limit($conf.get('stgm.max_stars'))
erb :index, locals: {
title: 'Dashboard',
channels: channels,
videos: videos,
active_projects: active_projects
}
end
end
end