-
Notifications
You must be signed in to change notification settings - Fork 23
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add created_at to create invoice response #413
Conversation
Codecov Report
@@ Coverage Diff @@
## main #413 +/- ##
==========================================
+ Coverage 59.12% 59.21% +0.09%
==========================================
Files 51 51
Lines 3481 3482 +1
==========================================
+ Hits 2058 2062 +4
+ Misses 1202 1200 -2
+ Partials 221 220 -1
|
@@ -134,6 +134,7 @@ type AddInvoiceResponseBody struct { | |||
PaymentHash string `json:"payment_hash"` | |||
PaymentRequest string `json:"payment_request"` | |||
ExpiresAt time.Time `json:"expires_at"` | |||
CreatedAt time.Time `json:"created_at"` |
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.
can we return this as timestamp? otherwise we have to deal with timezones?
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.
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.
CC @jankoegel
@@ -174,6 +175,7 @@ func (controller *InvoiceController) AddInvoice(c echo.Context) error { | |||
PaymentHash: invoice.RHash, | |||
PaymentRequest: invoice.PaymentRequest, | |||
ExpiresAt: invoice.ExpiresAt.Time, | |||
CreatedAt: invoice.CreatedAt, |
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.
why is it CreatedAt
here but ExpiresAt.Time
above?
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.
expiresAt is nullable, you can create an invoice that does not expire
…voice-response feat: add created_at to create invoice response
untested