diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-09-24 23:20:25 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2020-09-24 23:20:25 +0300 |
| commit | 17a624c8ddacc1dac4904793645d6c893f7ced77 (patch) | |
| tree | 1936f985376ed095189ba241f034f28207272a19 /Software/Visual_Studio/Web/Tango.MachineService/Controllers | |
| parent | 09b1dd03e5d67453e673789fe0826e7a25d881ab (diff) | |
| download | Tango-17a624c8ddacc1dac4904793645d6c893f7ced77.tar.gz Tango-17a624c8ddacc1dac4904793645d6c893f7ced77.zip | |
Changed all PPC updated to based on GUID !
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() |
