diff options
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs index 4215cd175..601438d67 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs @@ -390,7 +390,11 @@ namespace Tango.MachineService.Controllers if (hasDatabaseUpdates) { response.IsDatabaseUpdateAvailable = true; - response.UpdateDBResponse = UpdateDB(new UpdateDBRequest() { SerialNumber = request.SerialNumber }); + response.UpdateDBResponse = UpdateDB(new UpdateDBRequest() + { + ApplicationVersion = request.Version, + FirmwareVersion = request.FirmwareVersion + }); } //Compare database @@ -937,11 +941,11 @@ namespace Tango.MachineService.Controllers } else if (request.Mode == LoginMode.Machine) { - var machine = db.Machines.SingleOrDefault(x => x.SerialNumber == request.SerialNumber); + var machine = db.Machines.SingleOrDefault(x => x.SerialNumber == request.SerialNumber || x.Guid == request.MachineGuid); if (machine == null) { - throw new AuthenticationException("Invalid serial number."); + throw new AuthenticationException("Invalid machine serial number or id."); } response.AccessToken = WebToken<TokenObject>.CreateNew(MachineServiceConfig.JWT_TOKEN_SECRET, new TokenObject() |
