mirror of
https://github.com/samsonjs/samhuri.net.git
synced 2026-03-25 09:05:47 +00:00
expose HarpBlog#status as /status
This commit is contained in:
parent
3546ab2952
commit
034d975225
1 changed files with 7 additions and 0 deletions
|
|
@ -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'])
|
||||
|
|
|
|||
Loading…
Reference in a new issue