예제 #1
0
        public IActionResult Cancel([FromBody] FriendRequestViewModel model)
        {
            var request = _repository.GetRequest(model.SenderID, model.ReceiverID);

            if (request == null)
            {
                return(NotFound("Friend request has not been found!"));
            }

            _service.CancelRequest(model, request);
            return(Ok("Friend request has been canceled."));
        }