public IActionResult UpdateCategory(int id, CategoryPostAndPutModel category) { var cat = _dataService.UpdateCategory(id, category.Name, category.Description); if (cat == false) { return(NotFound()); } return(Ok(cat)); }
public IActionResult AddCategory(CategoryPostAndPutModel category) { var cat = _dataService.CreateCategory(category.Name, category.Description); return(Created("", cat)); }
public IActionResult AddCategory(CategoryPostAndPutModel category) { _dataService.CreateCategory(category.Name); return(Ok()); }