diff --git a/main.rb b/main.rb index d6bf13e..8c65698 100644 --- a/main.rb +++ b/main.rb @@ -9,12 +9,12 @@ require 'ostruct' Blog = OpenStruct.new( - :title => 'a scanty blog', - :author => 'John Doe', + :title => 'KingInk scanty blog', + :author => 'kfir', :url_base => 'http://localhost:4567/', - :admin_password => 'changeme', - :admin_cookie_key => 'scanty_admin', - :admin_cookie_value => '51d6d976913ace58', + :admin_password => 'kshay', + :admin_cookie_key => 'kshay_admin', + :admin_cookie_value => 'k5159268', :disqus_shortname => nil ) end @@ -89,7 +89,7 @@ def auth end post '/auth' do - set_cookie(Blog.admin_cookie_key, Blog.admin_cookie_value) if params[:password] == Blog.admin_password + response.set_cookie(Blog.admin_cookie_key, Blog.admin_cookie_value) if params[:password] == Blog.admin_password redirect '/' end