Skip to content

Commit

Permalink
update mappers
Browse files Browse the repository at this point in the history
  • Loading branch information
Joren-vanGoethem committed Dec 28, 2023
1 parent f70b79d commit 3e2b853
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion FrostApi/Models/Thing/Thing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public static Thing Create(string name, string description, Dictionary<string, s

return new Thing
{
Description = description,
Name = name,
Description = description,
Properties = properties,
Lat = lat,
Lon = lon,
Expand Down
4 changes: 2 additions & 2 deletions Importer/Mappers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public static Thing MapDksrResponse(TreeSenseSensorData treeData, string dataTyp

var observation = new Observation { Result = treeData.HealthState, PhenomenonTime = treeData.Timestamp };

return Thing.Create($"{dataType}{treeData.Sid}", dataType, properties, treeData.Lat, treeData.Lng, observation);
return Thing.Create($"{dataType}-{treeData.Sid}", dataType, properties, treeData.Lat, treeData.Lng, observation);
}

public static Thing MapDksrResponse(ParkingLotSensorData parkingLot, string dataType)
Expand All @@ -27,7 +27,7 @@ public static Thing MapDksrResponse(ParkingLotSensorData parkingLot, string data

var observation = new Observation { Result = parkingLot.Occupied, PhenomenonTime = parkingLot.Timestamp };

return Thing.Create($"{dataType}{parkingLot.Sid}", dataType, properties, parkingLot.Lat, parkingLot.Lon, observation);
return Thing.Create($"{dataType}-{parkingLot.Sid}", dataType, properties, parkingLot.Lat, parkingLot.Lon, observation);
}

public static DataStream MapFrostResponseToDataStream(DataStreamResponse? response)
Expand Down

0 comments on commit 3e2b853

Please sign in to comment.