Mercurial > hg > orthanc
diff OrthancServer/OrthancRestApi.cpp @ 211:b7aea293b965
list of resources
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 29 Nov 2012 09:56:46 +0100 |
parents | 96b7918a6a18 |
children | f276b175dcaf |
line wrap: on
line diff
--- a/OrthancServer/OrthancRestApi.cpp Wed Nov 28 18:03:44 2012 +0100 +++ b/OrthancServer/OrthancRestApi.cpp Thu Nov 29 09:56:46 2012 +0100 @@ -401,20 +401,6 @@ const Arguments& getArguments, const std::string& postData) { - if (uri.size() == 0) - { - if (method == "GET") - { - output.Redirect("app/explorer.html"); - } - else - { - output.SendMethodNotAllowedError("GET"); - } - - return; - } - bool existingResource = false; Json::Value result(Json::objectValue); @@ -451,36 +437,6 @@ } - // List all the patients, studies or series --------------------------------- - - if (uri.size() == 1 && - (uri[0] == "series" || - uri[0] == "studies" || - uri[0] == "patients")) - { - if (method == "GET") - { - result = Json::Value(Json::arrayValue); - - if (uri[0] == "instances") - index_.GetAllUuids(result, ResourceType_Instance); - else if (uri[0] == "series") - index_.GetAllUuids(result, ResourceType_Series); - else if (uri[0] == "studies") - index_.GetAllUuids(result, ResourceType_Study); - else if (uri[0] == "patients") - index_.GetAllUuids(result, ResourceType_Patient); - - existingResource = true; - } - else - { - output.SendMethodNotAllowedError("GET"); - return; - } - } - - // Information about a single object ---------------------------------------- else if (uri.size() == 2 &&