Skip to content

Commit

Permalink
Merge pull request #30 from kimvex/shops-section-user
Browse files Browse the repository at this point in the history
🐛 Resuelto bugs de valor de telefono, resultado de tiendas, y gro…
  • Loading branch information
kimvex committed Mar 18, 2019
2 parents e24e49e + b3166f7 commit e8db98b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/api/shop.cr
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class Shop
.group_concat([:url_image, :images_shop, :url], :image_id, :images)
.first

shop_result
shop_result.to_json
end

put "#{url}/shop/:shop_id/update" do |env|
Expand Down
2 changes: 1 addition & 1 deletion src/api/users.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Users
email = env.params.json["email"]
fullname = env.params.json["fullname"]
age = env.params.json.has_key?("age") ? (env.params.json["age"].to_s).to_i : nil
phone = env.params.json.has_key?("phone") ? (env.params.json["phone"].to_s).to_i : nil
phone = env.params.json.has_key?("phone") ? (env.params.json["phone"].to_s).to_i64 : nil
gender = env.params.json.has_key?("gender") ? env.params.json["gender"].to_s : nil

token = Token.generatePasswordHash(password)
Expand Down
3 changes: 2 additions & 1 deletion src/database/mysql.cr
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ class Database
field
end
}
@query = "#{@query} GROUP BY #{group_field ? group_field : group_fields.join(",")}"

@query = "#{@query} GROUP BY #{group_field.not_nil! ? group_fields.join(",") : group_field}"
self
end

Expand Down

0 comments on commit e8db98b

Please sign in to comment.