This commit is contained in:
Sami Samhuri 2015-04-19 16:19:42 -07:00
parent 2fb181dbcb
commit eb471b0d24

View file

@ -109,7 +109,7 @@ end
# publish the site # publish the site
post '/publish' do post '/publish' do
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -224,7 +224,7 @@ end
# make a draft # make a draft
post '/posts/drafts' do post '/posts/drafts' do
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -260,7 +260,7 @@ end
# update a post # update a post
put '/posts/:year/:month/:id' do |year, month, id| put '/posts/:year/:month/:id' do |year, month, id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -289,7 +289,7 @@ end
# update a draft # update a draft
put '/posts/drafts/:id' do |id| put '/posts/drafts/:id' do |id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -318,7 +318,7 @@ end
# delete a post # delete a post
delete '/posts/:year/:month/:id' do |year, month, id| delete '/posts/:year/:month/:id' do |year, month, id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -329,7 +329,7 @@ end
# delete a draft # delete a draft
delete '/posts/drafts/:id' do |id| delete '/posts/drafts/:id' do |id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -340,7 +340,7 @@ end
# publish a post # publish a post
post '/posts/drafts/:id/publish' do |id| post '/posts/drafts/:id/publish' do |id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end
@ -358,7 +358,7 @@ end
# unpublish a post # unpublish a post
post '/posts/:year/:month/:id/unpublish' do |year, month, id| post '/posts/:year/:month/:id/unpublish' do |year, month, id|
unless authenticated?(request['Auth']) unless authenticated?(request.env['HTTP_AUTH'])
status 403 status 403
return 'forbidden' return 'forbidden'
end end