expose HarpBlog#status as /status

This commit is contained in:
Sami Samhuri 2014-10-18 15:37:31 -07:00
parent 3546ab2952
commit 034d975225

View file

@ -67,6 +67,13 @@ set :port, $config[:port]
blog = HarpBlog.new($config[:path], $config[:dry_run])
# status
get '/status' do
status 200
headers 'Content-Type' => 'application/json'
JSON.generate(blog.status)
end
# list years
get '/years' do
unless authenticated?(request['Auth'])