Indentation

This commit is contained in:
Râu Cao 2024-03-31 12:08:51 +03:00
parent d9dff3e872
commit 3ba333e802
Signed by: raucao
GPG Key ID: 37036C356E56CC51

View File

@ -69,26 +69,26 @@ class LnurlpayController < ApplicationController
private private
def find_user def find_user
@user = User.where(cn: params[:username], ou: Setting.primary_domain).first @user = User.where(cn: params[:username], ou: Setting.primary_domain).first
http_status :not_found if @user.nil? http_status :not_found if @user.nil?
end end
def metadata(address) def metadata(address)
"[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Send sats, receive thanks.\"]]" "[[\"text/identifier\", \"#{address}\"], [\"text/plain\", \"Send sats, receive thanks.\"]]"
end end
def valid_amount?(amount_in_sats) def valid_amount?(amount_in_sats)
amount_in_sats <= MAX_SATS && amount_in_sats >= MIN_SATS amount_in_sats <= MAX_SATS && amount_in_sats >= MIN_SATS
end end
def valid_comment?(comment) def valid_comment?(comment)
comment.length <= MAX_COMMENT_CHARS comment.length <= MAX_COMMENT_CHARS
end end
private private
def check_service_available def check_service_available
http_status :not_found unless Setting.lndhub_enabled? http_status :not_found unless Setting.lndhub_enabled?
end end
end end