Exemple #1
0
        public async Task <IActionResult> ChangeActivation(Guid id)
        {
            var model = new CommonResult {
                IsOk = false
            };

            var userUid = id;

            if (userUid.IsEmptyGuid())
            {
                return(Json(model));
            }

            var request  = new UserChangeActivationRequest(CurrentUser.Id, userUid);
            var response = await OrganizationService.ChangeActivationForUser(request);

            if (response.Status.IsNotSuccess)
            {
                return(Json(model));
            }

            model.IsOk = true;
            CurrentUser.IsActionSucceed = true;
            return(Json(model));
        }