Пример #1
0
        public IActionResult ChangeRelationStatus(string Id)
        {
            var claimsIdentity = (ClaimsIdentity)this.User.Identity;
            var claim          = claimsIdentity.FindFirst(ClaimTypes.NameIdentifier);

            if (claim != null)
            {
                var components = Id.Split("*");
                var receiverId = components[0];
                var status     = components[1];
                var userId     = claim.Value;
                _context.ChangeRelation(userId, receiverId, status);
                return(Json("success"));
            }
            return(Json("error"));
        }