Fix geopoint doesn't working
This commit is contained in:
parent
94443fa411
commit
98f3606887
@ -187,7 +187,7 @@ namespace ManagerService.Controllers
|
||||
/// Update a geo point
|
||||
/// </summary>
|
||||
/// <param name="updatedGeoPoint">GeoPoint to update</param>
|
||||
[ProducesResponseType(typeof(GeoPoint), 200)]
|
||||
[ProducesResponseType(typeof(GeoPointDTO), 200)]
|
||||
[ProducesResponseType(typeof(string), 400)]
|
||||
[ProducesResponseType(typeof(string), 404)]
|
||||
[ProducesResponseType(typeof(string), 500)]
|
||||
@ -219,7 +219,7 @@ namespace ManagerService.Controllers
|
||||
|
||||
_myInfoMateDbContext.SaveChanges();
|
||||
|
||||
return new OkObjectResult(existingGeoPoint);
|
||||
return new OkObjectResult(existingGeoPoint.ToDTO());
|
||||
}
|
||||
catch (ArgumentNullException ex)
|
||||
{
|
||||
|
||||
@ -128,11 +128,7 @@ namespace ManagerService.Data.SubSection
|
||||
description = Description,
|
||||
contents = Contents,
|
||||
categorieId = CategorieId,
|
||||
geometry = Geometry != null ? new GeometryDTO
|
||||
{
|
||||
type = Geometry.GeometryType,
|
||||
coordinates = Geometry.Coordinates,
|
||||
} : null,
|
||||
geometry = Geometry != null ? Geometry.ToDto() : null,
|
||||
polyColor = PolyColor,
|
||||
imageResourceId = ImageResourceId,
|
||||
imageUrl = ImageUrl,
|
||||
|
||||
@ -156,6 +156,7 @@ namespace ManagerService
|
||||
var connectionString = Configuration.GetConnectionString("PostgresConnection");
|
||||
|
||||
var dataSourceBuilder = new NpgsqlDataSourceBuilder(connectionString);
|
||||
dataSourceBuilder.UseNetTopologySuite();
|
||||
dataSourceBuilder.EnableDynamicJson();
|
||||
var dataSource = dataSourceBuilder.Build();
|
||||
|
||||
@ -190,7 +191,7 @@ namespace ManagerService
|
||||
app.UseCors(
|
||||
#if DEBUG
|
||||
options => options
|
||||
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:55307")
|
||||
.SetIsOriginAllowed(origin => string.IsNullOrEmpty(origin) || origin == "http://localhost:62080")
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user