Пример #1
0
        public async Task <IActionResult> CheckInviteAsync(Guid token)
        {
            var invite = await _inviteService.GetByIdAsync(token);

            if (invite != null)
            {
                if (invite.Disabled == false)
                {
                    invite.Disabled = true;

                    await _inviteService.UpdateAsync(invite);

                    return(RedirectToAction("Register", "Account"));
                }
                else
                {
                    return(Content("Недійсне запрошення!"));
                }
            }

            return(NotFound());
        }