Exemple #1
0
        public IActionResult AddNewCategory([FromBody] CategoriesDTO categories)
        {
            var category = _catService.AddCategories(categories.Name);

            if (category == null)
            {
                return(BadRequest("Bad request"));
            }
            else
            {
                return(Ok("Code 200, new category is added"));
            }
        }