aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Web
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-09-24 23:20:25 +0300
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-09-24 23:20:25 +0300
commit17a624c8ddacc1dac4904793645d6c893f7ced77 (patch)
tree1936f985376ed095189ba241f034f28207272a19 /Software/Visual_Studio/Web
parent09b1dd03e5d67453e673789fe0826e7a25d881ab (diff)
downloadTango-17a624c8ddacc1dac4904793645d6c893f7ced77.tar.gz
Tango-17a624c8ddacc1dac4904793645d6c893f7ced77.zip
Changed all PPC updated to based on GUID !
Diffstat (limited to 'Software/Visual_Studio/Web')
-rw-r--r--Software/Visual_Studio/Web/Tango.MachineService/Controllers/PPCController.cs10
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()