1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-08 12:10:30 -05:00

refactor "Active" to "NonDeleted"

This commit is contained in:
Nick Krantz 2025-05-28 21:47:03 -05:00
parent 089fba60a7
commit f553fd7f3d
No known key found for this signature in database
GPG Key ID: FF670021ABCAB82E
4 changed files with 4 additions and 4 deletions

View File

@ -40,5 +40,5 @@ public interface INotificationRepository : IRepository<Notification, Guid>
/// <returns> /// <returns>
/// A collection of notifications associated with the task that are not marked as deleted. /// A collection of notifications associated with the task that are not marked as deleted.
/// </returns> /// </returns>
Task<IEnumerable<Notification>> GetActiveByTaskIdAsync(Guid taskId); Task<IEnumerable<Notification>> GetNonDeletedByTaskIdAsync(Guid taskId);
} }

View File

@ -28,7 +28,7 @@ public class MarkNotificationsForTaskAsDeletedCommand : IMarkNotificationsForTas
public async Task MarkAsDeletedAsync(Guid taskId) public async Task MarkAsDeletedAsync(Guid taskId)
{ {
var notifications = await _notificationRepository.GetActiveByTaskIdAsync(taskId); var notifications = await _notificationRepository.GetNonDeletedByTaskIdAsync(taskId);
foreach (var notification in notifications) foreach (var notification in notifications)
{ {

View File

@ -57,7 +57,7 @@ public class NotificationRepository : Repository<Notification, Guid>, INotificat
}; };
} }
public async Task<IEnumerable<Notification>> GetActiveByTaskIdAsync(Guid taskId) public async Task<IEnumerable<Notification>> GetNonDeletedByTaskIdAsync(Guid taskId)
{ {
await using var connection = new SqlConnection(ConnectionString); await using var connection = new SqlConnection(ConnectionString);

View File

@ -75,7 +75,7 @@ public class NotificationRepository : Repository<Core.NotificationCenter.Entitie
}; };
} }
public async Task<IEnumerable<Core.NotificationCenter.Entities.Notification>> GetActiveByTaskIdAsync(Guid taskId) public async Task<IEnumerable<Core.NotificationCenter.Entities.Notification>> GetNonDeletedByTaskIdAsync(Guid taskId)
{ {
await using var scope = ServiceScopeFactory.CreateAsyncScope(); await using var scope = ServiceScopeFactory.CreateAsyncScope();