Ejemplo n.º 1
0
        public async Task <IActionResult> AddStringEntryVote(CharacterStringEntryType entryType, int id, int entryId)
        {
            var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier);
            await _entryService.AddCharacterStringEntryVoteAsync(entryType, userId, id, entryId);

            return(RedirectToAction("Index", new { id = id }));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> AddStringEntryVote(AddRemoveStringEntryVote vm)
        {
            var userId = GetUserId();
            await _entryService.AddCharacterStringEntryVoteAsync(vm.StringEntryType, GetUserId(), vm.CharacterId, vm.EntryId);

            var sections = await _characterService.GetSectionsAsync(vm.CharacterId, userId);

            return(new JsonResult(sections));
        }