diff Plugin/Plugin.cpp @ 82:1c91a1cbbc35

fix
author Alain Mazy <am@osimis.io>
date Fri, 17 Mar 2023 15:01:15 +0100
parents fac45493d547
children e2c3c497eb8d
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Thu Mar 16 17:38:03 2023 +0100
+++ b/Plugin/Plugin.cpp	Fri Mar 17 15:01:15 2023 +0100
@@ -515,10 +515,11 @@
       if (hasValue)
       {
         unsigned int validity; // not used
-        authorizationService_->GetUserProfile(validity, profile, *token, value);
-        
-        OrthancPlugins::AnswerJson(profile, output);
-        break;
+        if (authorizationService_->GetUserProfile(validity, profile, *token, value))
+        {
+          OrthancPlugins::AnswerJson(profile, output);
+          return;
+        }
       }
     }