示例#1
0
        public async Task <IActionResult> Get(string username)
        {
            var result = await _storageService
                         .GetUserAsync(username)
                         .OrFailAsync();

            return(Ok(result));
        }
示例#2
0
        public async Task <IActionResult> Get()
        {
            var userId = HttpContext.GetUserId();

            var result = await _storageService
                         .GetUserAsync(userId)
                         .OrFailAsync();

            return(Ok(result));
        }