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:
parent
089fba60a7
commit
f553fd7f3d
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -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);
|
||||||
|
|
||||||
|
@ -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();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user