chore(codebase): full cleanup pass

This commit is contained in:
2025-06-21 01:58:48 -04:00
parent 8323477cd0
commit 81b5db34ef
92 changed files with 529 additions and 452 deletions

View File

@@ -1,6 +1,7 @@
using Hutopy.Infrastructure.BlobStorage.Contracts;
using Hutopy.Infrastructure.Security;
using Hutopy.Modules.Identity.Data;
using Microsoft.AspNetCore.Identity;
namespace Hutopy.Modules.Identity.Handlers;
@@ -40,7 +41,7 @@ public class ChangePortraitHandler(
ChangePortraitRequest request,
CancellationToken ct)
{
var user = await userManager.FindByIdAsync(HttpContext.User.GetUserId().ToString());
User? user = await userManager.FindByIdAsync(HttpContext.User.GetUserId().ToString());
if (user is null)
{
@@ -48,7 +49,7 @@ public class ChangePortraitHandler(
return;
}
var blobUrl = await blobStorage.UploadFileAsync(
string blobUrl = await blobStorage.UploadFileAsync(
ContainerNames.Users,
$"{user.Id}/{SubDirectoryNames.Profile}/{CommonFileNames.ProfilePicture}",
request.File.OpenReadStream(),
@@ -57,7 +58,7 @@ public class ChangePortraitHandler(
user.PortraitUrl = blobUrl;
var result = await userManager.UpdateAsync(user);
IdentityResult result = await userManager.UpdateAsync(user);
if (result.Succeeded)
{