mirror of https://github.com/ErsatzTV/ErsatzTV.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
646 B
17 lines
646 B
using ErsatzTV.Core.Interfaces.Repositories; |
|
|
|
namespace ErsatzTV.Application.Configuration; |
|
|
|
public class SaveConfigElementByKeyHandler : MediatR.IRequestHandler<SaveConfigElementByKey, Unit> |
|
{ |
|
private readonly IConfigElementRepository _configElementRepository; |
|
|
|
public SaveConfigElementByKeyHandler(IConfigElementRepository configElementRepository) => |
|
_configElementRepository = configElementRepository; |
|
|
|
public async Task<Unit> Handle(SaveConfigElementByKey request, CancellationToken cancellationToken) |
|
{ |
|
await _configElementRepository.Upsert(request.Key, request.Value); |
|
return Unit.Default; |
|
} |
|
} |