mirror of
https://github.com/wismna/ModernKeePass.git
synced 2025-10-04 08:00:16 -04:00
Update groups finally implemented
Code cleanup
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
using MediatR;
|
||||
using ModernKeePass.Application.Common.Interfaces;
|
||||
using ModernKeePass.Application.Entry.Models;
|
||||
using ModernKeePass.Domain.Exceptions;
|
||||
|
||||
namespace ModernKeePass.Application.Entry.Commands.DeleteHistory
|
||||
{
|
||||
public class DeleteHistoryCommand : IRequest
|
||||
{
|
||||
public string EntryId { get; set; }
|
||||
public EntryVm Entry { get; set; }
|
||||
public int HistoryIndex { get; set; }
|
||||
|
||||
public class DeleteHistoryCommandHandler : IRequestHandler<DeleteHistoryCommand>
|
||||
@@ -22,7 +23,8 @@ namespace ModernKeePass.Application.Entry.Commands.DeleteHistory
|
||||
{
|
||||
if (!_database.IsOpen) throw new DatabaseClosedException();
|
||||
|
||||
_database.DeleteHistory(message.EntryId, message.HistoryIndex);
|
||||
_database.DeleteHistory(message.Entry.Id, message.HistoryIndex);
|
||||
message.Entry.History.RemoveAt(message.HistoryIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user