diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-18 13:29:22 +0200 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2018-12-18 13:29:22 +0200 |
| commit | 45ac8eaf0e03d87c2f9728b2b7c84922c6f6a37d (patch) | |
| tree | f2cd9f1a268c0ef224279bae1d5e817dcaef1d75 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs | |
| parent | 79f12332efed3507c2316eef9698e5766be31ff8 (diff) | |
| download | Tango-45ac8eaf0e03d87c2f9728b2b7c84922c6f6a37d.tar.gz Tango-45ac8eaf0e03d87c2f9728b2b7c84922c6f6a37d.zip | |
Implemented OS activation + UWF.
Added OSKey to MACHINES table and machine service.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs index 304ea34f2..6126594c5 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs @@ -98,6 +98,11 @@ namespace Tango.MachineService.Controllers throw new AuthenticationException("The specified serial number could not be found."); } + if (machine.OsKey == null) + { + throw new InvalidDataException("The specified machine is not associated with an OS activation key."); + } + var machine_version = db.MachineVersions.SingleOrDefault(x => x.Guid == machine.MachineVersionGuid); var latest_machine_version = db.TangoVersions.Where(x => x.MachineVersionGuid == machine_version.Guid).ToList().OrderByDescending(x => Version.Parse(x.Version)).FirstOrDefault(); @@ -128,6 +133,7 @@ namespace Tango.MachineService.Controllers response.DbAddress = Config.DB_ADDRESS; response.DbUserName = credentials.UserName; response.DbPassword = credentials.Password; + response.OSKey = machine.OsKey; } return response; |
