Compare commits

..

No commits in common. "be2a6c5d6f2c3fa09d27072c1a9ed1ba4c26a5c0" and "f1621228db9fa91cb8960a5249d823fadf49ff4b" have entirely different histories.

3 changed files with 6 additions and 6 deletions

View File

@ -28,21 +28,21 @@ namespace Api.Controllers
return await _deviceLogic.GetDevices(userId);
}
[Authorize]
//[Authorize]
[HttpPost("adddevice/{userId}")]
public async Task<IActionResult> AddDevice([FromBody] Device device, int userId)
{
return await _deviceLogic.AddDevice(device, userId);
}
[Authorize]
//[Authorize]
[HttpGet("logs/{deviceId}")]
public async Task<IActionResult> GetLogs(int deviceId)
{
return await _deviceLogic.GetLogs(deviceId);
}
[Authorize]
//[Authorize]
[HttpPut("Edit/{deviceId}")]
public async Task<IActionResult> EditDevice([FromBody] Device device, int deviceId)
{

View File

@ -33,14 +33,14 @@ namespace Api.Controllers
return await _userLogic.RegisterUser(user);
}
[Authorize]
//[Authorize]
[HttpPut("Edit/{userId}")]
public async Task<IActionResult> EditUser([FromBody] User user, int userId)
{
return await _userLogic.EditProfile(user, userId);
}
[Authorize]
//[Authorize]
[HttpDelete("Delete/{userId}")]
public async Task<IActionResult> DeleteUser(int userId)
{

View File

@ -43,7 +43,7 @@ namespace Api.MQTTReciever
var mqttMessageReceive = JsonSerializer.Deserialize<MQTTMessageReceive>(sensorData);
if (mqttMessageReceive == null || mqttMessageReceive.temperature == 0 || mqttMessageReceive.device_id == null || mqttMessageReceive.timestamp == 0)
if (mqttMessageReceive == null || mqttMessageReceive.temperature == 0 || mqttMessageReceive.device_id == null || mqttMessageReceive.timestamp == null)
{
return Task.CompletedTask;
}