public async Task <ActionResult <IEnumerable <BookChapter> > > GetBookChapterById(Guid id)
    {
        BookChapter?chapter = await _chapterService.FindAsync(id);

        if (chapter is null)
        {
            return(NotFound());
        }
        else
        {
            return(Ok(chapter));
        }
    }
Example #2
0
    public async Task <ActionResult <IEnumerable <BookChapter> > > GetBookChapterById(Guid id)
    {
        HttpContext.VerifyUserHasAnyAcceptedScope(readScopesRequired);

        BookChapter?chapter = await _chapterService.FindAsync(id);

        if (chapter is null)
        {
            return(NotFound());
        }
        else
        {
            return(Ok(chapter));
        }
    }