19 lines
674 B
C#
19 lines
674 B
C#
using FictionArchive.Service.NovelService.Models.IntegrationEvents;
|
|
using FictionArchive.Service.Shared.Services.EventBus;
|
|
|
|
namespace FictionArchive.Service.NovelService.Services.EventHandlers;
|
|
|
|
public class ChapterPullRequestedEventHandler : IIntegrationEventHandler<ChapterPullRequestedEvent>
|
|
{
|
|
private readonly NovelUpdateService _novelUpdateService;
|
|
|
|
public ChapterPullRequestedEventHandler(NovelUpdateService novelUpdateService)
|
|
{
|
|
_novelUpdateService = novelUpdateService;
|
|
}
|
|
|
|
public async Task Handle(ChapterPullRequestedEvent @event)
|
|
{
|
|
await _novelUpdateService.PullChapterContents(@event.NovelId, @event.ChapterNumber);
|
|
}
|
|
} |