diff options
| author | Roy <roy.mail.net@gmail.com> | 2017-12-03 08:40:12 +0200 |
|---|---|---|
| committer | Roy <roy.mail.net@gmail.com> | 2017-12-03 08:40:12 +0200 |
| commit | 7719e7647be76fb1f90968a04cf776952594dae6 (patch) | |
| tree | d9ba29ff1f3f1ede0a87e2c9078a448fc31b78e2 /Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs | |
| parent | c86984f6f012f10649d90b5d7c1786e12526b592 (diff) | |
| download | Tango-7719e7647be76fb1f90968a04cf776952594dae6.tar.gz Tango-7719e7647be76fb1f90968a04cf776952594dae6.zip | |
Working on remote sync.
Diffstat (limited to 'Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs')
| -rw-r--r-- | Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs index 8a4f94159..fd87815c9 100644 --- a/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs +++ b/Software/Visual_Studio/Web/Tango.MachineService/Controllers/SynchronizationController.cs @@ -27,6 +27,9 @@ namespace Tango.MachineService.Controllers String slaveSQLiteFile = Path.Combine(tempFolder, "Local.db"); File.WriteAllBytes(slaveSQLiteFile, request.LocalDB.ToByteArray()); + + + File.Copy(HostingEnvironment.MapPath(@"~/App_Data/Tango.db"), masterSQLiteFile); RemoteDBSynchronizer.Synchronize(masterSQLiteFile, request.SerialNumber); @@ -34,7 +37,7 @@ namespace Tango.MachineService.Controllers LocalDBSynchronizer.Synchronize(masterSQLiteFile, slaveSQLiteFile); SynchronizeDBResponse response = new SynchronizeDBResponse(); - response.ResponseDB = ByteString.CopyFrom(File.ReadAllBytes(slaveSQLiteFile)); + response.RemoteDB = ByteString.CopyFrom(File.ReadAllBytes(slaveSQLiteFile)); PathHelper.TryDeleteFolder(tempFolder); |
