public async Task <IActionResult> GetEventUserByUserId(string userId)
        {
            var currentUserId = _userManager.GetUserId(User);

            if (currentUserId != userId && !(await HasAccessAsync()))
            {
                return(StatusCode(StatusCodes.Status403Forbidden));
            }

            var eventUserModel = await eventUserService.EventUserAsync(userId, await _userManager.GetUserAsync(User));

            return(Ok(eventUserModel));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> GetEventUserByUserId(string userId)
        {
            var eventUserModel = await eventUserService.EventUserAsync(userId, await _userManager.GetUserAsync(User));

            return(Ok(eventUserModel));
        }