diff OrthancServer/OrthancRestApi/OrthancRestApi.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 6e7e5ed91c2d
children 8dc80ba768aa
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Tue Jun 30 17:19:26 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Tue Jun 30 18:41:33 2015 +0200
@@ -34,6 +34,7 @@
 #include "OrthancRestApi.h"
 
 #include "../DicomModification.h"
+#include "../ServerContext.h"
 
 #include <glog/logging.h>
 
@@ -112,4 +113,16 @@
     Register("/tools/reset", ResetOrthanc);
     Register("/instances/{id}/frames/{frame}", RestApi::AutoListChildren);
   }
+
+
+  ServerContext& OrthancRestApi::GetContext(RestApiCall& call)
+  {
+    return GetApi(call).context_;
+  }
+
+
+  ServerIndex& OrthancRestApi::GetIndex(RestApiCall& call)
+  {
+    return GetContext(call).GetIndex();
+  }
 }