From 37250901a6312bded08b403498775d2af5a11cf5 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Tue, 5 Sep 2023 19:25:45 +0700 Subject: [PATCH] feat: add created_at to create invoice response --- controllers_v2/invoice.ctrl.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/controllers_v2/invoice.ctrl.go b/controllers_v2/invoice.ctrl.go index 06b8b39a..2599233a 100644 --- a/controllers_v2/invoice.ctrl.go +++ b/controllers_v2/invoice.ctrl.go @@ -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 @@ -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)