diff --git a/public/template/account_management.ecr b/public/template/account_management.ecr index 46da95c..7d5e525 100644 --- a/public/template/account_management.ecr +++ b/public/template/account_management.ecr @@ -91,7 +91,7 @@
- + " width="150" height="150" class="greeting-l">
diff --git a/src/template_endpoints/account_management.cr b/src/template_endpoints/account_management.cr index 8b26505..ac59afd 100644 --- a/src/template_endpoints/account_management.cr +++ b/src/template_endpoints/account_management.cr @@ -12,7 +12,10 @@ CrystalGauntlet.template_endpoints["/accounts"] = ->(context : HTTP::Server::Con username = nil Templates.auth() - stars, demons, coins, user_coins, diamonds, creator_points = DATABASE.query_one("select stars, demons, coins, user_coins, diamonds, creator_points from users where id = ?", user_id, as: {Int32, Int32, Int32, Int32, Int32, Int32}) + stars, demons, coins, user_coins, diamonds, creator_points, icon_type, color1, color2, cube, ship, ball, ufo, wave, robot, spider, glow = DATABASE.query_one("select stars, demons, coins, user_coins, diamonds, creator_points, icon_type, color1, color2, cube, ship, ball, ufo, wave, robot, spider, glow from users where id = ?", user_id, as: {Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32, Int32}) + + icon_value = [cube, ship, ball, ufo, wave, robot, spider][icon_type] + type_str = ["cube", "ship", "ball", "ufo", "wave", "robot", "spider"][icon_type] ECR.embed("./public/template/account_management.ecr", context.response) }