diff OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 812:8a36c947490c

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 May 2014 14:51:49 +0200
parents 401a9633e492
children b640aeee11ba
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Wed May 07 16:58:22 2014 +0200
+++ b/OrthancServer/OrthancRestApi/OrthancRestModalities.cpp	Thu May 08 14:51:49 2014 +0200
@@ -472,8 +472,7 @@
     {
       RemoteModalityParameters modality;
       modality.FromJson(json);
-      modality.SetName(call.GetUriComponent("id", ""));
-      Configuration::UpdateModality(modality);
+      Configuration::UpdateModality(call.GetUriComponent("id", ""), modality);
     }
   }
 
@@ -492,8 +491,7 @@
     {
       OrthancPeerParameters peer;
       peer.FromJson(json);
-      peer.SetName(call.GetUriComponent("id", ""));
-      Configuration::UpdatePeer(peer);
+      Configuration::UpdatePeer(call.GetUriComponent("id", ""), peer);
     }
   }