Added create contact ednpoint
This commit is contained in:
@@ -79,13 +79,14 @@ func GetDeviceInfoForContract (deviceID uint64, contract models.Contract) (model
|
||||
}
|
||||
}
|
||||
|
||||
deviceInfosResponse := models.ConvertDeviceInfoToResponse(deviceInfos)
|
||||
|
||||
// Loop through each deviceInfo to create GeoJSON features
|
||||
for _, info := range deviceInfos {
|
||||
for _, info := range deviceInfosResponse {
|
||||
info.RawJSON = ""
|
||||
feature := models.GeoJSONFeature{
|
||||
Type: "Feature",
|
||||
DeviceInfo: &info,
|
||||
DeviceInfoResponse: &info,
|
||||
Geometry: models.GeoJSONGeometry{
|
||||
Type: "Point",
|
||||
Coordinates: []float64{info.Lon, info.Lat},
|
||||
|
||||
Reference in New Issue
Block a user