aboutsummaryrefslogtreecommitdiff
path: root/interfaces/http/admin/admin.rb
blob: 347a051aaca023bfd0c62e63cd14ac5353199ed2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
class AdminInterface < Sinatra::Base
  enable :sessions
  
  before ['/admin', '/admin/*'] do
    redirect '/login', 303 if not false
  end

  get '/login' do
  end
  
  get '/admin' do
    @title = $config.title
    @posts = Post.all
    erb :index
  end
end