diff OrthancServer/OrthancRestApi.cpp @ 413:47d63c941902

clearing /exports and /changes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 03 May 2013 15:23:09 +0200
parents c3e9b74aab7a
children b79bf2f4ab2e
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp	Fri May 03 13:11:16 2013 +0200
+++ b/OrthancServer/OrthancRestApi.cpp	Fri May 03 15:23:09 2013 +0200
@@ -639,6 +639,14 @@
   }
 
 
+  static void DeleteChanges(RestApi::DeleteCall& call)
+  {
+    RETRIEVE_CONTEXT(call);
+    context.GetIndex().DeleteChanges();
+    call.GetOutput().AnswerBuffer("", "text/plain");
+  }
+
+
   static void GetExports(RestApi::GetCall& call)
   {
     RETRIEVE_CONTEXT(call);
@@ -656,6 +664,14 @@
     }
   }
 
+
+  static void DeleteExports(RestApi::DeleteCall& call)
+  {
+    RETRIEVE_CONTEXT(call);
+    context.GetIndex().DeleteExportedResources();
+    call.GetOutput().AnswerBuffer("", "text/plain");
+  }
+
   
   // Get information about a single patient -----------------------------------
  
@@ -1483,7 +1499,9 @@
     Register("/system", GetSystemInformation);
     Register("/statistics", GetStatistics);
     Register("/changes", GetChanges);
+    Register("/changes", DeleteChanges);
     Register("/exports", GetExports);
+    Register("/exports", DeleteExports);
 
     Register("/instances", UploadDicomFile);
     Register("/instances", ListResources<ResourceType_Instance>);