master
E. Almqvist 3 years ago
parent e44a04eb68
commit fdd039857b
  1. 12
      wesweb01/evil_infosite/app.rb
  2. 4
      wesweb01/evil_infosite/views/login.slim
  3. 1
      wesweb01/evil_infosite/views/userpage.slim

@ -10,3 +10,15 @@ db_cache = get_db() # get all the parsed data
get "/" do
slim(:person, locals: {persondata: db_cache})
end
get "/login" do
slim(:login)
end
get "/userpage" do
userinfo = {
username: params[:username],
password: params[:password]
}
slim(:userpage, locals: {userinfo: userinfo})
end

@ -0,0 +1,4 @@
form action="/userpage" method="get"
input type="text" name="username"
input type="password" name="password"
input type="submit" value="Login"

@ -0,0 +1 @@
p Username: #{userinfo[:username]} | Password: #{userinfo[:password]}
Loading…
Cancel
Save