mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-10-30 02:02:36 +00:00
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
#include <Poco/TemporaryFile.h>
|
||||
#include <Poco/JSON/Object.h>
|
||||
#include <Poco/JSON/Parser.h>
|
||||
|
||||
#include <framework/RESTAPI_Handler.h>
|
||||
#include <framework/MicroServiceFuncs.h>
|
||||
#include <StorageService.h>
|
||||
|
||||
@@ -74,6 +74,7 @@ namespace OpenWifi {
|
||||
if (Response.getStatus() == Poco::Net::HTTPResponse::HTTP_OK) {
|
||||
Poco::JSON::Parser P;
|
||||
auto Result = P.parse(is).extract<Poco::JSON::Object::Ptr>();
|
||||
RESTAPI::
|
||||
NewCertificate.csr = Result->get("csr").toString();
|
||||
NewCertificate.certificate = Result->get("certificate").toString();
|
||||
NewCertificate.name = Result->get("name").toString();
|
||||
@@ -121,12 +122,10 @@ namespace OpenWifi {
|
||||
if (Response.getStatus() == Poco::Net::HTTPResponse::HTTP_OK) {
|
||||
Poco::JSON::Parser P;
|
||||
auto Result = P.parse(is).extract<Poco::JSON::Object::Ptr>();
|
||||
NewCertificate.csr = Result->get("csr").toString();
|
||||
NewCertificate.certificate = Result->get("certificate").toString();
|
||||
NewCertificate.name = Result->get("name").toString();
|
||||
NewCertificate.certificateChain = Result->get("certificate_chain").toString();
|
||||
NewCertificate.certificateId = Result->get("certificate_id").toString();
|
||||
NewCertificate.expiresAt = Result->get("expires_at");
|
||||
RESTAPIHandler::AssignIfPresent(Result,"certificate",NewCertificate.certificate);
|
||||
RESTAPIHandler::AssignIfPresent(Result,"certificate_chain",NewCertificate.certificateChain);
|
||||
RESTAPIHandler::AssignIfPresent(Result,"certificate_id",NewCertificate.certificateId);
|
||||
RESTAPIHandler::AssignIfPresent(Result,"expires_at",NewCertificate.expiresAt);
|
||||
std::cout << Response.getStatus() << " : ";
|
||||
Result->stringify(std::cout);
|
||||
std::cout << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user