mirror of
https://github.com/getAlby/lndhub.go.git
synced 2026-02-23 13:54:25 +01:00
Merge branch 'main' into payinvoice
* main: Correct style Add blank routes required for bluewallet
This commit is contained in:
@@ -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, "")
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
@@ -16,6 +15,12 @@ func NewGetTXSController(svc *service.LndhubService) *GetTXSController {
|
||||
}
|
||||
|
||||
// GetTXS : Get TXS Controller
|
||||
func (GetTXSController) GetTXS(c echo.Context) error {
|
||||
return c.JSON(http.StatusOK, &models.Invoice{})
|
||||
func (controller *GetTXSController) GetTXS(c echo.Context) error {
|
||||
transactions := []string{}
|
||||
return c.JSON(http.StatusOK, &transactions)
|
||||
}
|
||||
|
||||
func (controller *GetTXSController) GetUserInvoices(c echo.Context) error {
|
||||
transactions := []string{}
|
||||
return c.JSON(http.StatusOK, &transactions)
|
||||
}
|
||||
|
||||
2
main.go
2
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() {
|
||||
|
||||
Reference in New Issue
Block a user