Example #1
0
 public IActionResult AddCategory(string category)
 {
     if (adminLogic.AddCategory(category) > 0)
     {
         return(new JsonResult(new { message = "Successfully added category" }));
     }
     return(new JsonResult(new { message = "Failed to add category" }));
 }