Skip to content

Commit

Permalink
made amends according to pr
Browse files Browse the repository at this point in the history
  • Loading branch information
msalbrain committed Nov 13, 2023
1 parent f0da6e2 commit 57b9307
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
6 changes: 3 additions & 3 deletions internal/handlers/public/cart.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func Checkout(c *fiber.Ctx) error {
if err != nil {
log.Println(err)
}
if res.Status != "200 OK" {
if res.StatusCode != 200 {
log.Print("An issue has been identified with the payment webhook URL. Please verify that it responds with a status code of 200 OK.")
}
}()
Expand Down Expand Up @@ -189,7 +189,7 @@ func CheckoutSuccess(c *fiber.Ctx) error {
log.Println(err)
}

if res.Status != "200 OK" {
if res.StatusCode != 200 {
log.Print("An issue has been identified with the payment webhook URL. Please verify that it responds with a status code of 200 OK.")
}
}()
Expand Down Expand Up @@ -247,7 +247,7 @@ func CheckoutCancel(c *fiber.Ctx) error {
log.Println(err)
}

if res.Status != "200 OK" {
if res.StatusCode != 200 {
log.Print("An issue has been identified with the payment webhook URL. Please verify that it responds with a status code of 200 OK.")
}
}()
Expand Down
16 changes: 0 additions & 16 deletions internal/queries/cart.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,22 +129,6 @@ func (q *CartQueries) Cart(cartId string) (*models.Cart, error) {
if err != nil {
return nil, err
}

if email.Valid {
cart.Email = email.String
}

if name.Valid {
cart.Name = name.String
}

if paymentID.Valid {
cart.PaymentID = paymentID.String
}

if updated.Valid {
cart.Updated = updated.Int64
}

if err := rows.Err(); err != nil {
return nil, err
Expand Down
Loading

0 comments on commit 57b9307

Please sign in to comment.