change in tokens and addtelemetry(addData)
This commit is contained in:
@@ -25,12 +25,14 @@ public class TelemetryController : ControllerBase
|
||||
}
|
||||
|
||||
[HttpGet("AddData")]
|
||||
public async Task<ActionResult<int>> Create(string deviceName, decimal temperatureC, decimal humidityPercent,
|
||||
public async Task<ActionResult<int>> Create(object deviceName, decimal temperatureC, decimal humidityPercent,
|
||||
decimal soilPercent, int gasPPM, decimal lux, CancellationToken cancellationToken)
|
||||
{
|
||||
|
||||
TelemetryDto dto = new TelemetryDto
|
||||
{
|
||||
DeviceName = deviceName,
|
||||
DeviceName = deviceName.ToString() == "dr110"? "dr110":"",
|
||||
Id= deviceName.ToString() == "dr110" ? 0 : Convert.ToInt32(deviceName),
|
||||
TemperatureC = temperatureC,
|
||||
HumidityPercent = humidityPercent,
|
||||
SoilPercent = soilPercent,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://0.0.0.0:5064"
|
||||
"applicationUrl": "http://127.0.0.1:5064"
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
@@ -14,7 +14,7 @@
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://0.0.0.0:7274;http://0.0.0.0:5064"
|
||||
"applicationUrl": "https://127.0.0.1:7274;http://127.0.0.1:5064"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
|
||||
Reference in New Issue
Block a user