Skip to content

Commit

Permalink
https://telecominfraproject.atlassian.net/browse/WIFI-12868
Browse files Browse the repository at this point in the history
Signed-off-by: stephb9959 <[email protected]>
  • Loading branch information
stephb9959 committed Sep 1, 2023
1 parent 5425366 commit 6b49c68
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/framework/RESTAPI_Handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,16 @@ namespace OpenWifi {
Poco::JSON::Stringifier::stringify(Object, Answer);
}

inline void ReturnObject(const std::vector<std::string> &Strings) {
Poco::JSON::Array Arr;
for(const auto &String:Strings) {
Arr.add(String);
}
std::ostringstream os;
Arr.stringify(os);
return ReturnRawJSON(os.str());
}

inline void ReturnRawJSON(const std::string &json_doc) {
PrepareResponse();
if (Request != nullptr) {
Expand Down

0 comments on commit 6b49c68

Please sign in to comment.