Remove ln_login from users
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

Not needed anymore, removing in favor of unencrypted `ln_account`.
This commit is contained in:
Râu Cao
2023-02-23 20:13:08 +08:00
parent 84337c3a7d
commit 3c2fe7c15d
8 changed files with 12 additions and 9 deletions

View File

@@ -2,13 +2,12 @@ class CreateLndhubAccountJob < ApplicationJob
queue_as :default
def perform(user)
return if user.ln_login.present? && user.ln_password.present?
return if user.ln_account.present? && user.ln_password.present?
lndhub = LndhubV2.new
credentials = lndhub.create_account
user.update! ln_account: credentials["login"],
ln_login: credentials["login"], # TODO remove when production is migrated
ln_password: credentials["password"]
end
end