Add LndHub db/models, and quick stats for admin views
This commit is contained in:
@@ -5,7 +5,11 @@ class Admin::DonationsController < Admin::BaseController
|
||||
# GET /donations
|
||||
# GET /donations.json
|
||||
def index
|
||||
@donations = Donation.all
|
||||
@donations = Donation.all.order('created_at desc')
|
||||
@stats = {
|
||||
overall_sats: @donations.all.sum("amount_sats"),
|
||||
donor_count: Donation.distinct.count(:user_id)
|
||||
}
|
||||
end
|
||||
|
||||
# GET /donations/1
|
||||
|
||||
Reference in New Issue
Block a user