diff --git a/controllers/blank.ctrl.go b/controllers/blank.ctrl.go index 0d4d106..9e7d8ed 100644 --- a/controllers/blank.ctrl.go +++ b/controllers/blank.ctrl.go @@ -29,3 +29,7 @@ func (controller *BlankController) GetPending(c echo.Context) error { return c.JSON(http.StatusOK, &addresses) } + +func (controller *BlankController) Home(c echo.Context) error { + return c.JSON(http.StatusOK, "") +} diff --git a/controllers/gettxs.ctrl.go b/controllers/gettxs.ctrl.go index 38cd6c9..6b69efb 100644 --- a/controllers/gettxs.ctrl.go +++ b/controllers/gettxs.ctrl.go @@ -3,7 +3,6 @@ package controllers import ( "net/http" - "github.com/getAlby/lndhub.go/db/models" "github.com/getAlby/lndhub.go/lib/service" "github.com/labstack/echo/v4" ) @@ -17,5 +16,11 @@ func NewGetTXSController(svc *service.LndhubService) *GetTXSController { // GetTXS : Get TXS Controller func (GetTXSController) GetTXS(c echo.Context) error { - return c.JSON(http.StatusOK, &models.Invoice{}) + transactions := []string{} + return c.JSON(http.StatusOK, &transactions) +} + +func (GetTXSController) GetUserInvoices(c echo.Context) error { + transactions := []string{} + return c.JSON(http.StatusOK, &transactions) } diff --git a/main.go b/main.go index f9cfaad..b8cd7cd 100644 --- a/main.go +++ b/main.go @@ -119,6 +119,7 @@ func main() { secured.POST("/addinvoice", controllers.NewAddInvoiceController(svc).AddInvoice) secured.POST("/payinvoice", controllers.NewPayInvoiceController(svc).PayInvoice) secured.GET("/gettxs", controllers.NewGetTXSController(svc).GetTXS) + secured.GET("/getuserinvoices", controllers.NewGetTXSController(svc).GetUserInvoices) secured.GET("/checkpayment/:payment_hash", controllers.NewCheckPaymentController(svc).CheckPayment) secured.GET("/balance", controllers.NewBalanceController(svc).Balance) secured.GET("/getinfo", controllers.NewGetInfoController(svc).GetInfo) @@ -127,6 +128,7 @@ func main() { blankController := controllers.NewBlankController(svc) secured.GET("/getbtc", blankController.GetBtc) secured.GET("/getpending", blankController.GetPending) + e.GET("/", blankController.Home) // Start server go func() {