diff OrthancServer/main.cpp @ 1437:02f5a3f5c0a0

access to the REST API from Lua
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 30 Jun 2015 18:41:33 +0200
parents 0a3e3be59094
children 895ab369d63c
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Tue Jun 30 17:19:26 2015 +0200
+++ b/OrthancServer/main.cpp	Tue Jun 30 18:41:33 2015 +0200
@@ -503,7 +503,7 @@
     }
     
     context->SetStorageArea(*storage);
-
+    context->GetLua().SetOrthancRestApi(restApi);
 
     // GO !!! Start the requested servers
     if (Configuration::GetGlobalBoolParameter("HttpServerEnabled", true))
@@ -549,6 +549,8 @@
     LOG(WARNING) << "    Plugins have stopped";
 #endif
 
+    context->GetLua().ResetOrthancRestApi();
+
     dicomServer.Stop();
     LOG(WARNING) << "    DICOM server has stopped";