Auctions progress

master
E. Almqvist 3 years ago
parent e2a36e4d34
commit c244bbd919
  1. 4
      src/app.rb
  2. 1
      src/const.rb

@ -162,6 +162,10 @@ end
post "/auctions" do
user_id = session[:userid]
title = params[:title]
init_price = params[:init_price]
newid = 0
redirect "/auctions/#{newid}"
end
get "/auctions/:id" do

@ -39,6 +39,7 @@ MAX_BIO_LEN = 128
EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-]+(\.[a-z\d\-]+)*\.[a-z]+\z/
NAME_REGEX_STR = "[a-zA-Z-_0-9 ]{#{MIN_NAME_LEN},#{MAX_NAME_LEN}}"
BIO_REGEX_STR = "{#{MIN_BIO_LEN},#{MAX_BIO_LEN}}"
DESC_REGEX_STR = "{#{MIN_DESC_LEN},#{MAX_DESC_LEN}}"
# Routes that needs auth

Loading…
Cancel
Save