From b87b9c2437211b2222f27536b2be97c89dfee915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Thu, 23 Feb 2023 17:54:34 +0800 Subject: [PATCH] Prevent double render --- app/controllers/lnurlpay_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/lnurlpay_controller.rb b/app/controllers/lnurlpay_controller.rb index f880151..92a846a 100644 --- a/app/controllers/lnurlpay_controller.rb +++ b/app/controllers/lnurlpay_controller.rb @@ -19,7 +19,7 @@ class LnurlpayController < ApplicationController end def keysend - http_status :not_found unless Setting.lndhub_keysend_enabled? + http_status :not_found and return unless Setting.lndhub_keysend_enabled? render json: { status: "OK", @@ -90,6 +90,6 @@ class LnurlpayController < ApplicationController private def check_feature_enabled - http_status :not_found if !Setting.lndhub_enabled? + http_status :not_found unless Setting.lndhub_enabled? end end