Audit all changes made in the admin view.

This commit is contained in:
2020-06-10 00:27:39 +01:00
parent c6941d1450
commit e111dc5e32
89 changed files with 516 additions and 236 deletions

View File

@@ -46,7 +46,7 @@ namespace Marechai.Services
ProcessorId = e.ProcessorId, ExtensionId = e.ExtensionId
}).OrderBy(e => e.Extension).ToListAsync();
public async Task DeleteAsync(int id)
public async Task DeleteAsync(int id, string userId)
{
InstructionSetExtensionsByProcessor item = await _context.InstructionSetExtensionsByProcessor.FindAsync(id);
@@ -55,10 +55,10 @@ namespace Marechai.Services
_context.InstructionSetExtensionsByProcessor.Remove(item);
await _context.SaveChangesAsync();
await _context.SaveChangesWithUserAsync(userId);
}
public async Task<int> CreateAsync(int processorId, int extensionId)
public async Task<int> CreateAsync(int processorId, int extensionId, string userId)
{
var item = new InstructionSetExtensionsByProcessor
{
@@ -66,7 +66,7 @@ namespace Marechai.Services
};
await _context.InstructionSetExtensionsByProcessor.AddAsync(item);
await _context.SaveChangesAsync();
await _context.SaveChangesWithUserAsync(userId);
return item.Id;
}