using FictionArchive.Service.NovelService.Models.IntegrationEvents; using FictionArchive.Service.Shared.Services.EventBus; namespace FictionArchive.Service.NovelService.Services.EventHandlers; public class NovelUpdateRequestedEventHandler : IIntegrationEventHandler { private readonly ILogger _logger; private readonly IEventBus _eventBus; private readonly NovelUpdateService _novelUpdateService; public NovelUpdateRequestedEventHandler(ILogger logger, IEventBus eventBus, NovelUpdateService novelUpdateService) { _logger = logger; _eventBus = eventBus; _novelUpdateService = novelUpdateService; } public async Task Handle(NovelUpdateRequestedEvent @event) { await _novelUpdateService.ImportNovel(@event.NovelUrl); } }