comparison OrthancServer/LuaScripting.cpp @ 2799:6e3a60b85da6

New primitives to access Orthanc peers from plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 22 Aug 2018 16:55:07 +0200
parents 3a55b77339ff
children 4767d36679ed
comparison
equal deleted inserted replaced
2798:5c83e5cf9d79 2799:6e3a60b85da6
454 if (operation == "store-peer") 454 if (operation == "store-peer")
455 { 455 {
456 std::string name = parameters["Peer"].asString(); 456 std::string name = parameters["Peer"].asString();
457 457
458 WebServiceParameters peer; 458 WebServiceParameters peer;
459 Configuration::GetOrthancPeer(peer, name); 459 if (Configuration::GetOrthancPeer(peer, name))
460 460 {
461 return lock.AddStorePeerOperation(peer); 461 return lock.AddStorePeerOperation(peer);
462 }
463 else
464 {
465 LOG(ERROR) << "No peer with symbolic name: " << name;
466 throw OrthancException(ErrorCode_UnknownResource);
467 }
462 } 468 }
463 469
464 if (operation == "modify") 470 if (operation == "modify")
465 { 471 {
466 std::auto_ptr<DicomModification> modification(new DicomModification); 472 std::auto_ptr<DicomModification> modification(new DicomModification);