コード例 #1
0
        public async Task <IActionResult> GetOutgoingRequests([FromRoute] Guid userId)
        {
            var tkn = Request.Headers["Authorization"];

            if (!_authService.AuthorizeSelf(tkn, userId))
            {
                return(Unauthorized());
            }

            return(Ok(await _requestsRepository.GetRequestsBySenderId(userId)));
        }