Mercurial > hg > orthanc
comparison OrthancServer/OrthancRestApi.cpp @ 204:7f4acf490179
changes api
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 28 Nov 2012 11:27:57 +0100 |
parents | dfa2899d9960 |
children | 7f74209ea0f8 |
comparison
equal
deleted
inserted
replaced
203:9283552c25df | 204:7f4acf490179 |
---|---|
715 if (uri.size() == 1 && uri[0] == "changes") | 715 if (uri.size() == 1 && uri[0] == "changes") |
716 { | 716 { |
717 if (method == "GET") | 717 if (method == "GET") |
718 { | 718 { |
719 const static unsigned int MAX_RESULTS = 100; | 719 const static unsigned int MAX_RESULTS = 100; |
720 | 720 |
721 std::string filter = GetArgument(arguments, "filter", ""); | 721 //std::string filter = GetArgument(arguments, "filter", ""); |
722 int64_t since; | 722 int64_t since; |
723 unsigned int limit; | 723 unsigned int limit; |
724 try | 724 try |
725 { | 725 { |
726 since = boost::lexical_cast<int64_t>(GetArgument(arguments, "since", "0")); | 726 since = boost::lexical_cast<int64_t>(GetArgument(arguments, "since", "0")); |
735 if (limit == 0 || limit > MAX_RESULTS) | 735 if (limit == 0 || limit > MAX_RESULTS) |
736 { | 736 { |
737 limit = MAX_RESULTS; | 737 limit = MAX_RESULTS; |
738 } | 738 } |
739 | 739 |
740 if (!index_.GetChanges(result, since, filter, limit)) | 740 if (!index_.GetChanges(result, since, limit)) |
741 { | 741 { |
742 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); | 742 output.SendHeader(Orthanc_HttpStatus_400_BadRequest); |
743 return; | 743 return; |
744 } | 744 } |
745 | 745 |