finishing edit form

This commit is contained in:
2026-03-22 23:27:16 +01:00
parent 65fa420306
commit 17f8a8f760
5 changed files with 72 additions and 25 deletions
@@ -66,9 +66,18 @@ namespace CityInfo.WEB.Services
}
}
public Task<bool> UpdatePointOfInterest(int cityId, PointOfInterest pointOfInterest)
public async Task<bool> UpdatePointOfInterest(int cityId, PointOfInterest pointOfInterest)
{
throw new NotImplementedException();
try
{
var response = await _httpClient.PutAsJsonAsync($"/api/cities/{cityId}/pointsofinterest/{pointOfInterest.Id}", pointOfInterest);
return response.IsSuccessStatusCode;
}
catch (Exception ex)
{
_logger.LogError(ex, $"Erreur lors de la mise à jour du point d'intéret {pointOfInterest.Id}", pointOfInterest.Id);
return false;
}
}
}
}