mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-05 18:48:41 +00:00
feat: comments & paste/comment reactions; renames/refactors
this is a LOT, i should've commited in stages but oh well, from what i can remember:
- paste interactions (reactions)
- comments
- comment interactions (reactions)
- rich text editor
- move all report apis into report controller
- rename size to sizeStored
- rename trueSize to originalSize
- fixed compression on paste compression
- implemented compression threshold
- use longs instead of ints where possible in the entities
- improve record view + remove redundant check for existing view
This commit is contained in:
@@ -74,6 +74,7 @@ namespace SharpbinV3.Server
|
||||
builder.Services.AddScoped<UserService>();
|
||||
builder.Services.AddScoped<AuthService>();
|
||||
builder.Services.AddScoped<PasteService>();
|
||||
builder.Services.AddScoped<CommentService>();
|
||||
builder.Services.AddScoped<ApiKeyService>();
|
||||
builder.Services.AddScoped<VerificationService>();
|
||||
builder.Services.AddScoped<TotpVerificationProvider>();
|
||||
@@ -331,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.Size);
|
||||
var trueTotalPasteSize = await db.Pastes.SumAsync(p => p.TrueSize);
|
||||
var totalPasteSize = await db.Pastes.SumAsync(p => p.StoredSize);
|
||||
var trueTotalPasteSize = await db.Pastes.SumAsync(p => p.OriginalSize);
|
||||
|
||||
var dailyCounts = await db
|
||||
.Pastes.Where(p => p.CreatedAt >= sevenDaysAgo)
|
||||
|
||||
Reference in New Issue
Block a user