finishing edit form
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user