Exemplo n.º 1
0
        public IHttpActionResult BlockUser(string blockedUserId)
        {
            var    token  = Request.Headers.GetValues("x-auth-token").First();
            string userId = _tokenManager.GetUserId(token);

            if (_usersManager.BlockUser(userId, blockedUserId))
            {
                return(Ok("You blocked this user successfully"));
            }
            return(InternalServerError());
        }