master
E. Almqvist 3 years ago
parent 8228016ee6
commit eebab9d185
  1. 1
      src/app.rb
  2. 2
      src/const.rb
  3. 6
      src/db_models.rb
  4. BIN
      src/public/avatars/.png
  5. BIN
      src/public/avatars/3.png
  6. 2
      src/views/index.slim

@ -150,4 +150,3 @@ post "/user/update" do
redirect "/settings"
end

@ -31,4 +31,4 @@ BIO_REGEX_STR = "{#{MIN_BIO_LEN},#{MAX_BIO_LEN}}"
# Routes that needs auth
AUTH_ROUTES = %w[/settings /auction/post]
AUTH_ROUTES = %w[/settings /auction /user]

@ -1,6 +1,6 @@
# User model
class User < EntityModel
attr_reader :email, :name, :bio_text, :balance, :avatar_url, :pw_hash, :reputation
attr_reader :email, :name, :bio_text, :avatar_url, :pw_hash, :reputation
def initialize(data)
super data
@ -17,6 +17,10 @@ class User < EntityModel
return @avatar_url
end
def balance
@balance.to_f
end
def role
user_roles = roles
if user_roles.length > 0 then

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 318 KiB

@ -10,4 +10,4 @@ article.index
article.index
h1.tcenter.title
| Recent auctions
| Recent posts

Loading…
Cancel
Save