From 9c728d10c487d7361767407ea07b19f72f1f6168 Mon Sep 17 00:00:00 2001 From: Jonathan Bourdon Date: Tue, 7 Jan 2025 03:08:44 -0500 Subject: [PATCH] Adds missing await on transaction --- src/Web/Features/Contents/Handlers/CreateContent.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/Web/Features/Contents/Handlers/CreateContent.cs b/src/Web/Features/Contents/Handlers/CreateContent.cs index 5905ff6..4d1cad1 100644 --- a/src/Web/Features/Contents/Handlers/CreateContent.cs +++ b/src/Web/Features/Contents/Handlers/CreateContent.cs @@ -1,10 +1,7 @@ using System.Collections.Concurrent; -using Hutopy.Web.Common; using Hutopy.Web.Common.BlobStorage; using Hutopy.Web.Common.Security; using Hutopy.Web.Features.Contents.Data; -using Hutopy.Web.Features.Contents.Handlers.Models; -using Microsoft.EntityFrameworkCore; namespace Hutopy.Web.Features.Contents.Handlers; @@ -69,7 +66,7 @@ public sealed class PostContent( var urls = new ConcurrentBag(); string? thumbnailUrl = null; - using var transaction = await context.Database.BeginTransactionAsync(ct); + await using var transaction = await context.Database.BeginTransactionAsync(ct); try {