mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2026-03-20 03:41:02 +00:00
20 lines
516 B
C++
20 lines
516 B
C++
//
|
|
// Created by stephane bourque on 2021-07-21.
|
|
//
|
|
|
|
#include "RESTAPI_deviceDashboardHandler.h"
|
|
#include "Daemon.h"
|
|
#include "Dashboard.h"
|
|
|
|
namespace OpenWifi {
|
|
void RESTAPI_deviceDashboardHandler::DoGet() {
|
|
poco_information(Logger(),fmt::format("GET-DASHBOARD: {}", Requester()));
|
|
GWObjects::Dashboard Data;
|
|
if(Daemon()->GetDashboard().Get(Data, Logger())) {
|
|
Poco::JSON::Object Answer;
|
|
Data.to_json(Answer);
|
|
return ReturnObject(Answer);
|
|
}
|
|
return BadRequest(RESTAPI::Errors::InternalError);
|
|
}
|
|
} |