Added maintener in perform API

This commit is contained in:
Lucio Maranta
2019-01-11 11:48:10 +01:00
parent 81d31f48ef
commit c27f8ad3ef
@@ -180,7 +180,11 @@ namespace Step.Controllers.WebApi
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintData.PlcCounter, maintenanceId, Convert.ToInt32(userId.Value));
if (performed == null)
return NotFound();
maintData.LastPerformedDate = performed.Date;
cmsError = ncHandler.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out maintData);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
return Ok(maintData);
}
}