Move lndhub invoice creation to service

This commit is contained in:
2024-04-16 20:19:15 +02:00
parent c3b82fc2a9
commit 5685e1b7bc
4 changed files with 33 additions and 24 deletions

View File

@@ -143,12 +143,6 @@ class User < ApplicationRecord
enable_service Setting.default_services
end
def ln_create_invoice(payload)
lndhub = Lndhub.new
lndhub.authenticate self
lndhub.addinvoice payload
end
def dn
return @dn if defined?(@dn)
@dn = Devise::LDAP::Adapter.get_dn(self.cn)