comparison OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 813:b640aeee11ba

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 08 May 2014 15:15:55 +0200
parents 8a36c947490c
children a811bdf8b8eb
comparison
equal deleted inserted replaced
812:8a36c947490c 813:b640aeee11ba
471 if (reader.parse(call.GetPutBody(), json)) 471 if (reader.parse(call.GetPutBody(), json))
472 { 472 {
473 RemoteModalityParameters modality; 473 RemoteModalityParameters modality;
474 modality.FromJson(json); 474 modality.FromJson(json);
475 Configuration::UpdateModality(call.GetUriComponent("id", ""), modality); 475 Configuration::UpdateModality(call.GetUriComponent("id", ""), modality);
476 call.GetOutput().AnswerBuffer("", "text/plain");
476 } 477 }
477 } 478 }
478 479
479 480
480 static void DeleteModality(RestApi::DeleteCall& call) 481 static void DeleteModality(RestApi::DeleteCall& call)
481 { 482 {
482 Configuration::RemoveModality(call.GetUriComponent("id", "")); 483 Configuration::RemoveModality(call.GetUriComponent("id", ""));
484 call.GetOutput().AnswerBuffer("", "text/plain");
483 } 485 }
484 486
485 487
486 static void UpdatePeer(RestApi::PutCall& call) 488 static void UpdatePeer(RestApi::PutCall& call)
487 { 489 {
490 if (reader.parse(call.GetPutBody(), json)) 492 if (reader.parse(call.GetPutBody(), json))
491 { 493 {
492 OrthancPeerParameters peer; 494 OrthancPeerParameters peer;
493 peer.FromJson(json); 495 peer.FromJson(json);
494 Configuration::UpdatePeer(call.GetUriComponent("id", ""), peer); 496 Configuration::UpdatePeer(call.GetUriComponent("id", ""), peer);
497 call.GetOutput().AnswerBuffer("", "text/plain");
495 } 498 }
496 } 499 }
497 500
498 501
499 static void DeletePeer(RestApi::DeleteCall& call) 502 static void DeletePeer(RestApi::DeleteCall& call)
500 { 503 {
501 Configuration::RemovePeer(call.GetUriComponent("id", "")); 504 Configuration::RemovePeer(call.GetUriComponent("id", ""));
505 call.GetOutput().AnswerBuffer("", "text/plain");
502 } 506 }
503 507
504 508
505 void OrthancRestApi::RegisterModalities() 509 void OrthancRestApi::RegisterModalities()
506 { 510 {