It it now possible to create/edit item contents
This commit is contained in:
@@ -6,12 +6,14 @@ namespace Bitvault;
|
||||
public class OpenLockerHandler(IConfigurationDescriptor<LockerConfiguration> descriptor,
|
||||
ISecurityKeyFactory securityKeyFactory,
|
||||
ILockerStorageFactory lockerStorageFactory) :
|
||||
IHandler<ActivateEventArgs<Locker>, bool>
|
||||
IHandler<ActivateEventArgs<Locker<string>>, bool>
|
||||
{
|
||||
public async Task<bool> Handle(ActivateEventArgs<Locker> args,
|
||||
public async Task<bool> Handle(ActivateEventArgs<Locker<string>> args,
|
||||
CancellationToken cancellationToken)
|
||||
{
|
||||
if (args.Value is Locker locker && descriptor.Name is { Length: > 0 } name && locker.Password is { Length: > 0 } password)
|
||||
if (args.Value is Locker<string> locker &&
|
||||
descriptor.Name is { Length: > 0 } name &&
|
||||
locker.Value is { Length: > 0 } password)
|
||||
{
|
||||
LockerConfiguration configuration = descriptor.Value;
|
||||
if (configuration.Key?.Split(':') is { Length: >= 2 } keyPart)
|
||||
|
||||
Reference in New Issue
Block a user