Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi/OrthancRestModalities.cpp @ 3192:595bfee4391a
URI "/peers?expand" provides more information
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 05 Feb 2019 06:44:36 +0100 |
parents | 860aed8258c3 |
children | f687e11aeb13 |
comparison
equal
deleted
inserted
replaced
3191:20826867141f | 3192:595bfee4391a |
---|---|
1013 { | 1013 { |
1014 WebServiceParameters peer; | 1014 WebServiceParameters peer; |
1015 | 1015 |
1016 if (lock.GetConfiguration().LookupOrthancPeer(peer, *it)) | 1016 if (lock.GetConfiguration().LookupOrthancPeer(peer, *it)) |
1017 { | 1017 { |
1018 Json::Value jsonPeer = Json::objectValue; | 1018 Json::Value info; |
1019 // only return the minimum information to identify the | 1019 peer.FormatPublic(info); |
1020 // destination, do not include "security" information like | 1020 result[*it] = info; |
1021 // passwords | |
1022 jsonPeer["Url"] = peer.GetUrl(); | |
1023 if (!peer.GetUsername().empty()) | |
1024 { | |
1025 jsonPeer["Username"] = peer.GetUsername(); | |
1026 } | |
1027 result[*it] = jsonPeer; | |
1028 } | 1021 } |
1029 } | 1022 } |
1030 call.GetOutput().AnswerJson(result); | 1023 call.GetOutput().AnswerJson(result); |
1031 } | 1024 } |
1032 else // if expand is not present, keep backward compatibility and return an array of peers | 1025 else // if expand is not present, keep backward compatibility and return an array of peers |