mirror of
https://github.com/bitwarden/server.git
synced 2026-06-01 01:55:55 -05:00
* 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>
32 lines
888 B
C#
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);
|
|
}
|
|
}
|
|
}
|