21 lines
534 B
Ruby
21 lines
534 B
Ruby
# 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
|