diff OrthancServer/OrthancRestApi/OrthancRestApi.cpp @ 1564:1b7def486e62

creation of DICOM series
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 21 Aug 2015 15:01:21 +0200
parents f967bdf8534e
children 904096e7367e
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Fri Aug 21 13:47:34 2015 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Fri Aug 21 15:01:21 2015 +0200
@@ -39,8 +39,9 @@
 
 namespace Orthanc
 {
-  void OrthancRestApi::AnswerStoredInstance(RestApiPostCall& call,
+  void OrthancRestApi::AnswerStoredResource(RestApiPostCall& call,
                                             const std::string& publicId,
+                                            ResourceType resourceType,
                                             StoreStatus status) const
   {
     Json::Value result = Json::objectValue;
@@ -48,7 +49,7 @@
     if (status != StoreStatus_Failure)
     {
       result["ID"] = publicId;
-      result["Path"] = GetBasePath(ResourceType_Instance, publicId);
+      result["Path"] = GetBasePath(resourceType, publicId);
     }
 
     result["Status"] = EnumerationToString(status);
@@ -88,7 +89,7 @@
     std::string publicId;
     StoreStatus status = context.Store(publicId, toStore);
 
-    OrthancRestApi::GetApi(call).AnswerStoredInstance(call, publicId, status);
+    OrthancRestApi::GetApi(call).AnswerStoredResource(call, publicId, ResourceType_Instance, status);
   }