Ejemplo n.º 1
0
        public async Task <IActionResult> ChangeActivation(Guid id, Guid organizationUid)
        {
            var model = new CommonResult {
                IsOk = false
            };

            var labelUid = id;

            if (labelUid.IsEmptyGuid() ||
                organizationUid.IsEmptyGuid())
            {
                return(Json(model));
            }

            var request  = new LabelChangeActivationRequest(CurrentUser.Id, organizationUid, labelUid);
            var response = await _labelService.ChangeActivation(request);

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

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