remove redundant param, just use env

This commit is contained in:
Sami Samhuri 2015-05-10 13:55:47 -07:00
parent 732da17859
commit 8d0036ddb0

View file

@ -206,7 +206,7 @@ post '/posts/drafts' do
id, title, body, link = @fields.values_at('id', 'title', 'body', 'link')
begin
if post = blog.create_post(title, body, link, id: id, draft: true)
if @fields['publish'] == 'true'
if @fields['env']
post = blog.publish_post(post)
blog.publish(@fields['env'])
end