13 lines
387 B
Ruby
13 lines
387 B
Ruby
class Admin::LightningController < Admin::BaseController
|
|
def index
|
|
@current_section = :lightning
|
|
|
|
@users = User.pluck(:cn, :ou, :ln_account)
|
|
@accounts = LndhubAccount.with_balances.order(balance: :desc).to_a
|
|
|
|
@ln = {}
|
|
@ln[:current_balance] = LndhubAccount.current.joins(:ledgers).sum("account_ledgers.amount")
|
|
@ln[:users_with_sats] = @accounts.length
|
|
end
|
|
end
|