Skip to content

Commit

Permalink
fix check
Browse files Browse the repository at this point in the history
  • Loading branch information
KranjQ committed Dec 16, 2024
1 parent 9e10a8f commit 47b130b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (h *Handler) Handle(w http.ResponseWriter, r *http.Request) {
object := jsonData["object"].(map[string]interface{})
amount := object["amount"].(map[string]interface{})
h.logger.Info("amount", zap.Any("amount", amount))
price, err := strconv.Atoi(amount["value"].(string))
price, err := strconv.ParseFloat(amount["value"].(string), 32)
if err != nil {
h.logger.Error("parse json price", zap.Error(err))
http.Error(w, "parse json error", http.StatusBadRequest)
Expand Down

0 comments on commit 47b130b

Please sign in to comment.