예제 #1
0
        public async Task <IActionResult> UpdateResourceCategory(int id,
                                                                 [FromBody] UpdateResourceCategoryViewModel model)
        {
            var result = await _resourceCategoryService.UpdateResourceCategory(id, model);

            return(result.ToJsonResult());
        }
예제 #2
0
        public async Task <IActionResult> Update(ResourceCategoryDTO sermonCategory)
        {
            var output = await _sermonCategoryService.UpdateResourceCategory(sermonCategory);

            if (output.IsErrorOccured)
            {
                return(BadRequest());
            }
            else
            {
                return(Ok(output));
            }
        }