Пример #1
0
        public async Task <MangaDisplayModel> Handle(FindMangaQuerie request, CancellationToken cancellationToken)
        {
            var manga = await _repo.FindMangaById(request.Id, cancellationToken);

            manga.CoverPictureLocation = _fileHandler.CreateFullUrlFromStored(manga.CoverPictureLocation);
            return(manga);
        }
Пример #2
0
        public async Task <MangaDisplayModel> Handle(RandomMangaQuerie request, CancellationToken cancellationToken)
        {
            MangaDisplayModel output = await _repo.GetRandomManga(cancellationToken);

            output.CoverPictureLocation = _fileHandler.CreateFullUrlFromStored(output.CoverPictureLocation);
            return(output);
        }
Пример #3
0
        public async Task <ChapterModel> Handle(FindChapterQuerie request, CancellationToken cancellationToken)
        {
            ChapterModel output = await _repo.GetChapterBy(request.ChapterId, cancellationToken);

            foreach (var picture in output.Pictures)
            {
                picture.ImageLocation = _fileHandler.CreateFullUrlFromStored(picture.ImageLocation);
            }
            return(output);
        }