From df39f2bd463576390603309c0b3c67626999171f Mon Sep 17 00:00:00 2001 From: whoswhip Date: Wed, 17 Jun 2026 20:28:58 -0400 Subject: [PATCH] chore: format code via prettier & csharpier --- .../src/lib/components/Paste.svelte | 2 +- .../src/routes/@[username]/+server.ts | 6 +-- .../src/routes/[id]/+page.svelte | 40 +++++++++---------- .../Controllers/ReportController.cs | 12 +++++- 4 files changed, 34 insertions(+), 26 deletions(-) diff --git a/SharpbinV3.Client/src/lib/components/Paste.svelte b/SharpbinV3.Client/src/lib/components/Paste.svelte index fff42fd..e2c190e 100644 --- a/SharpbinV3.Client/src/lib/components/Paste.svelte +++ b/SharpbinV3.Client/src/lib/components/Paste.svelte @@ -143,7 +143,7 @@ > - {#if paste.editedAt > Date.now() - 86_400_000} + {#if paste.editedAt > Date.now() - 86_400_000} Edited {dateToRelativeString(new Date(paste.editedAt), true, false, now)} {:else} Edited on {new Date(paste.editedAt).toLocaleDateString()} diff --git a/SharpbinV3.Client/src/routes/@[username]/+server.ts b/SharpbinV3.Client/src/routes/@[username]/+server.ts index 217b499..10b8fc6 100644 --- a/SharpbinV3.Client/src/routes/@[username]/+server.ts +++ b/SharpbinV3.Client/src/routes/@[username]/+server.ts @@ -1,7 +1,7 @@ import { error, redirect } from '@sveltejs/kit'; export async function GET({ params }) { - const username = params?.username; - if (!username) throw error(404, 'User not found'); - throw redirect(302, `/user/${encodeURIComponent(username)}`); + const username = params?.username; + if (!username) throw error(404, 'User not found'); + throw redirect(302, `/user/${encodeURIComponent(username)}`); } diff --git a/SharpbinV3.Client/src/routes/[id]/+page.svelte b/SharpbinV3.Client/src/routes/[id]/+page.svelte index d4bd6b9..a17851c 100644 --- a/SharpbinV3.Client/src/routes/[id]/+page.svelte +++ b/SharpbinV3.Client/src/routes/[id]/+page.svelte @@ -818,30 +818,30 @@ > {:else} diff --git a/SharpbinV3.Server/Controllers/ReportController.cs b/SharpbinV3.Server/Controllers/ReportController.cs index c820879..b052ec1 100644 --- a/SharpbinV3.Server/Controllers/ReportController.cs +++ b/SharpbinV3.Server/Controllers/ReportController.cs @@ -258,7 +258,11 @@ namespace SharpbinV3.Server.Controllers if (!Enum.IsDefined(reportType)) return BadRequest(new { success = false, message = "Invalid report type." }); - if (!await _verificationService.VerifyAsync(new VerificationContext { Token = request.VerificationToken, Ip = HttpContext.GetRequestIP() })) + if ( + !await _verificationService.VerifyAsync( + new VerificationContext { Token = request.VerificationToken, Ip = HttpContext.GetRequestIP() } + ) + ) return BadRequest(new { success = false, message = "Verification failed." }); Report report = await _reportService.CreateReport(user.UUID, ReportTargetType.Paste, paste.PID, reportType, request.Description); @@ -366,7 +370,11 @@ namespace SharpbinV3.Server.Controllers if (!Enum.IsDefined(reportType)) return BadRequest(new { success = false, message = "Invalid report type." }); - if (!await _verificationService.VerifyAsync(new VerificationContext { Token = request.VerificationToken, Ip = HttpContext.GetRequestIP() })) + if ( + !await _verificationService.VerifyAsync( + new VerificationContext { Token = request.VerificationToken, Ip = HttpContext.GetRequestIP() } + ) + ) return Unauthorized(new { success = false, message = "Invalid verification token." }); Report report = await _reportService.CreateReport(reporter.UUID, ReportTargetType.User, uuid, reportType, request.Description);