diff --git a/RazorPagesMovie/Services/ContactMessageNotificationService.cs b/RazorPagesMovie/Services/ContactMessageNotificationService.cs index 908a478..ff151a3 100644 --- a/RazorPagesMovie/Services/ContactMessageNotificationService.cs +++ b/RazorPagesMovie/Services/ContactMessageNotificationService.cs @@ -79,6 +79,7 @@ public class ContactMessageNotificationService : BackgroundService if (response.IsSuccessStatusCode) { eintrag.NotificationSent = true; + await context.SaveChangesAsync(stoppingToken); } else { @@ -90,7 +91,5 @@ public class ContactMessageNotificationService : BackgroundService _logger.LogError(ex, "Telegram-Versand fehlgeschlagen für ContactMessage {Id}", eintrag.Id); } } - - await context.SaveChangesAsync(stoppingToken); } -} +} \ No newline at end of file