mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
fix: show uncompressed size in stats
also renamed variables to make it more readable
This commit is contained in:
@@ -332,8 +332,8 @@ namespace SharpbinV3.Server
|
||||
|
||||
var pasteCount = await db.Pastes.CountAsync();
|
||||
var userCount = await db.Users.CountAsync();
|
||||
var totalPasteSize = await db.Pastes.SumAsync(p => p.StoredSize);
|
||||
var trueTotalPasteSize = await db.Pastes.SumAsync(p => p.OriginalSize);
|
||||
var totalStoredSize = await db.Pastes.SumAsync(p => p.StoredSize);
|
||||
var totalOriginalSize = await db.Pastes.SumAsync(p => p.OriginalSize);
|
||||
|
||||
var dailyCounts = await db
|
||||
.Pastes.Where(p => p.CreatedAt >= sevenDaysAgo)
|
||||
@@ -363,8 +363,8 @@ namespace SharpbinV3.Server
|
||||
{
|
||||
total = pasteCount,
|
||||
past7Days = pasteCountWeek,
|
||||
totalSizeInBytes = totalPasteSize,
|
||||
trueTotalSizeInBytes = trueTotalPasteSize,
|
||||
totalStoredSizeInBytes = totalStoredSize,
|
||||
totalOriginalSizeInBytes = totalOriginalSize,
|
||||
daily = dailyStats,
|
||||
},
|
||||
users = new { total = userCount },
|
||||
|
||||
Reference in New Issue
Block a user