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));
        }
    }
Esempio n. 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));
        }
    }