diff OrthancServer/OrthancRestApi/OrthancRestApi.cpp @ 1005:84b6d7bca6db lua-scripting

refactoring of ServerContext::Store
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 08 Jul 2014 14:34:11 +0200
parents 83622b0f544c
children 0332e6e8c679
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Tue Jul 08 14:06:05 2014 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestApi.cpp	Tue Jul 08 14:34:11 2014 +0200
@@ -71,8 +71,11 @@
 
     LOG(INFO) << "Receiving a DICOM file of " << postData.size() << " bytes through HTTP";
 
+    DicomInstanceToStore toStore;
+    toStore.SetBuffer(postData);
+
     std::string publicId;
-    StoreStatus status = context.Store(publicId, postData);
+    StoreStatus status = context.Store(publicId, toStore);
 
     OrthancRestApi::GetApi(call).AnswerStoredInstance(call, publicId, status);
   }