Skip to content

Commit

Permalink
Merge pull request #413 from getAlby/feat/add-created-at-to-create-in…
Browse files Browse the repository at this point in the history
…voice-response

feat: add created_at to create invoice response
  • Loading branch information
kiwiidb committed Sep 7, 2023
2 parents 018a1b3 + 3725090 commit 56b569b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions controllers_v2/invoice.ctrl.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

// AddInvoice godoc
Expand Down Expand Up @@ -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,
}

return c.JSON(http.StatusOK, &responseBody)
Expand Down

0 comments on commit 56b569b

Please sign in to comment.