New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃敟added webhook support #61
Conversation
internal/queries/cart.go
Outdated
|
||
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 | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that validating data from the database here is unnecessary.
By logic - when we write data to the database, we validate them, and they should return already valid.
internal/handlers/public/cart.go
Outdated
log.Println(err) | ||
} | ||
|
||
if res.Status != "200 OK" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be use
if res.Status != "200 OK" { | |
if res.StatusCode != 200 { |
internal/handlers/public/cart.go
Outdated
if err != nil { | ||
log.Println(err) | ||
} | ||
if res.Status != "200 OK" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if res.Status != "200 OK" { | |
if res.StatusCode != 200 { |
@msalbrain, good job! |
internal/handlers/public/cart.go
Outdated
log.Println(err) | ||
} | ||
|
||
if res.Status != "200 OK" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if res.Status != "200 OK" { | |
if res.StatusCode != 200 { |
Thank you very much |
Description
Please delete options that are not relevant.
Checklist: