public IActionResult Edit(Gym model) { _gymService.UpdateGym(model); UploadFile(model); return(RedirectToAction("List")); }
public IActionResult UpdateGym(int GymId, GymDto dto) { Log.Information("Attempting to update gym."); Gym g = _GymService.UpdateGym(GymId, dto); if (g == null) { Log.Error("Failed to update gym."); return(BadRequest()); } else { Log.Information("Gym updated successfully. " + g); return(Ok(g)); } }