示例#1
0
        public async Task <IActionResult> GetAchievementDocumentsByUserId(string userId)
        {
            var currentUser = await _userManager.GetUserAsync(User);

            if (await HasAccessSupporterAndRegisteredAsync(userId))
            {
                return(Ok(await _blankAchievementDocumentService.GetDocumentsByUserIdAsync(userId)));
            }
            _loggerService.LogError($"User (id: {currentUser.Id}) hasn't access to achievement documents (id: {userId})");
            return(StatusCode(StatusCodes.Status403Forbidden));
        }
示例#2
0
 public async Task <IActionResult> GetAchievementDocumentsByUserId(string userId)
 {
     return(Ok(await _blankAchievementDocumentService.GetDocumentsByUserIdAsync(userId)));
 }