mirror of
https://github.com/getAlby/lndhub.go.git
synced 2025-12-22 23:25:26 +01:00
chore: use limits from JWT if available
This commit is contained in:
@@ -46,6 +46,7 @@ type KeySendResponseBody struct {
|
||||
|
||||
func (controller *KeySendController) KeySend(c echo.Context) error {
|
||||
userID := c.Get("UserID").(int64)
|
||||
limits := controller.svc.GetLimitsFromContext(c)
|
||||
reqBody := KeySendRequestBody{}
|
||||
if err := c.Bind(&reqBody); err != nil {
|
||||
c.Logger().Errorf("Failed to load keysend request body: %v", err)
|
||||
@@ -75,7 +76,7 @@ func (controller *KeySendController) KeySend(c echo.Context) error {
|
||||
})
|
||||
}
|
||||
|
||||
resp, err := controller.svc.CheckOutgoingPaymentAllowed(c.Request().Context(), lnPayReq, userID)
|
||||
resp, err := controller.svc.CheckOutgoingPaymentAllowed(c.Request().Context(), lnPayReq, userID, limits)
|
||||
if err != nil {
|
||||
return c.JSON(http.StatusInternalServerError, responses.GeneralServerError)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user