public async Task <IActionResult> DeleteImage(int id, string type) { var plant = await _plantService.GetPlantById(id); if (plant == null) { return(NotFound()); } if (type == "slika") { // DeleteImage(plant.Slika); } if (type == "slikaUPrirodi") { // DeleteImage(plant.SlikaUPrirodi); } var result = await _plantService.DeleteImageForPlant(id, type); return(Ok(new { Success = result })); }