Files
server/util/SeederApi/Commands/DestroyBatchScenesCommand.cs
Matt Gibson 4f37c93349 Arch/cipher scene (#7241)
* User Cipher scene

For now only supports one login cipher

* Fixup batch delete, which fails due to db collisions

* Create cipher scenes for each cipher type

* Remove unnecessary mutex locking

* Include notes in ssh key ciphers

* Add reprompt to ssh keys

* Add deleted and archived options to login cipher seeder

* Remove ArchivedDate for now

* Update util/Seeder/Factories/SshKeyCipherSeeder.cs

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>

* Allow setting favorite in seeder

* Propagate favorites to created cipher

* Propagate delete date to cipher creation

fix favorites, which have to be all caps for detection on the client side

* conditionally set cipher as favorite

* More review comments

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
2026-03-24 12:00:26 -07:00

32 lines
888 B
C#

using Bit.SeederApi.Commands.Interfaces;
namespace Bit.SeederApi.Commands;
public class DestroyBatchScenesCommand(
ILogger<DestroyBatchScenesCommand> logger,
IDestroySceneCommand destroySceneCommand) : IDestroyBatchScenesCommand
{
public async Task DestroyAsync(IEnumerable<string> playIds)
{
var exceptions = new List<Exception>();
foreach (var playId in playIds)
{
try
{
await destroySceneCommand.DestroyAsync(playId);
}
catch (Exception ex)
{
exceptions.Add(ex);
logger.LogError(ex, "Error deleting seeded data: {PlayId}", playId);
}
}
if (exceptions.Count > 0)
{
throw new AggregateException("One or more errors occurred while deleting seeded data", exceptions);
}
}
}