diff Plugin/Plugin.cpp @ 57:55539d564f4f

added support for /dicom-web/series? & /dicom-web/instances?
author Alain Mazy <am@osimis.io>
date Wed, 09 Nov 2022 15:40:35 +0100
parents c02f0646297d
children ad279c70c22d
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Tue Nov 08 16:10:22 2022 +0100
+++ b/Plugin/Plugin.cpp	Wed Nov 09 15:40:35 2022 +0100
@@ -73,13 +73,9 @@
     {
       // Parse the resources that are accessed through this URI
       OrthancPlugins::IAuthorizationParser::AccessedResources accesses;
-      std::map<std::string, std::string> getArguments;
-      for (uint32_t i = 0; i < getArgumentsCount; i++)
-      {
-        getArguments[getArgumentsKeys[i]] = getArgumentsValues[i];
-      }
+      OrthancPlugins::AssociativeArray getArguments(getArgumentsCount, getArgumentsKeys, getArgumentsValues, true);
 
-      if (!authorizationParser_->Parse(accesses, uri, getArguments))
+      if (!authorizationParser_->Parse(accesses, uri, getArguments.GetMap()))
       {
         return 0;  // Unable to parse this URI
       }
@@ -109,9 +105,6 @@
             OrthancPlugins::AssociativeArray headers
               (headersCount, headersKeys, headersValues, false);
 
-            OrthancPlugins::AssociativeArray getArguments
-              (getArgumentsCount, getArgumentsKeys, getArgumentsValues, true);
-
             // Loop over all the authorization tokens stored in the HTTP
             // headers, until finding one that is granted
             for (std::list<OrthancPlugins::Token>::const_iterator