Exemplo n.º 1
0
        public async Task <IActionResult> RemoveToksFromSet(string setId, List <string> tokIds)
        {
            ResultViewModel result = new ResultViewModel()
            {
                ResultEnum = Result.Failed, ResultMessage = "Saving Failed!"
            };

            if (tokIds.Count > 0)
            {
                var set = await _setService.GetSetAsync(setId);

                var flag = await _setService.DeleteToksFromSetAsync(set, tokIds.ToArray());

                if (flag)
                {
                    result.ResultEnum    = Result.Success;
                    result.ResultMessage = "Delete Successful!";
                }
            }

            return(Json(result));
        }