From b950694753dca3da3ce6b64c0c675e6b769171ab Mon Sep 17 00:00:00 2001 From: stephb9959 Date: Fri, 1 Sep 2023 09:26:06 -0700 Subject: [PATCH] https://telecominfraproject.atlassian.net/browse/WIFI-12868 Signed-off-by: stephb9959 --- src/framework/RESTAPI_Handler.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/framework/RESTAPI_Handler.h b/src/framework/RESTAPI_Handler.h index a7ed681..b74d6e7 100644 --- a/src/framework/RESTAPI_Handler.h +++ b/src/framework/RESTAPI_Handler.h @@ -574,6 +574,16 @@ namespace OpenWifi { Poco::JSON::Stringifier::stringify(Object, Answer); } + inline void ReturnObject(const std::vector &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) {