Exemple #1
0
        public IHttpActionResult BlockUser(string userToBlockId)
        {
            var userId      = RequestContext.Principal.Identity.GetUserId();
            var userToBlock = _userService.GetById(userToBlockId);

            if (userToBlock == null)
            {
                return(NotFound());
            }
            _requestService.BlockUser(userToBlockId, userId);
            return(Ok());
        }