comparison OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 1063:0332e6e8c679

Fix automated generation of the list of resource children in the REST API
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Jul 2014 16:06:26 +0200
parents bd2cb95003da
children 952cf9b6be83
comparison
equal deleted inserted replaced
1062:804a75413ee7 1063:0332e6e8c679
389 Configuration::GetListOfOrthancPeers(peers); 389 Configuration::GetListOfOrthancPeers(peers);
390 390
391 std::string id = call.GetUriComponent("id", ""); 391 std::string id = call.GetUriComponent("id", "");
392 if (IsExistingPeer(peers, id)) 392 if (IsExistingPeer(peers, id))
393 { 393 {
394 Json::Value result = Json::arrayValue; 394 RestApi::AutoListChildren(call);
395 result.append("store");
396 call.GetOutput().AnswerJson(result);
397 } 395 }
398 } 396 }
399 397
400 static void PeerStore(RestApiPostCall& call) 398 static void PeerStore(RestApiPostCall& call)
401 { 399 {
456 Configuration::GetListOfDicomModalities(modalities); 454 Configuration::GetListOfDicomModalities(modalities);
457 455
458 std::string id = call.GetUriComponent("id", ""); 456 std::string id = call.GetUriComponent("id", "");
459 if (IsExistingModality(modalities, id)) 457 if (IsExistingModality(modalities, id))
460 { 458 {
461 Json::Value result = Json::arrayValue; 459 RestApi::AutoListChildren(call);
462 result.append("echo");
463 result.append("find-patient");
464 result.append("find-study");
465 result.append("find-series");
466 result.append("find-instance");
467 result.append("find");
468 result.append("store");
469 call.GetOutput().AnswerJson(result);
470 } 460 }
471 } 461 }
472 462
473 463
474 static void UpdateModality(RestApiPutCall& call) 464 static void UpdateModality(RestApiPutCall& call)