Exemplo n.º 1
0
        public async Task <IActionResult> SetRating(ViewChapterViewModel model)
        {
            var author = await userManager.FindByNameAsync(User.Identity.Name);

            if (!fanficService.IsRated(author, model.FanficId))
            {
                fanficService.SetRating(author, model.FanficId, model.Rating);
            }
            return(Redirect("/Fanfic/ViewChapter/?fanficId=" + model.FanficId + "&number=" + model.ChapterNumber));
        }