mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralgw.git
synced 2026-03-20 03:41:02 +00:00
28 lines
598 B
C++
28 lines
598 B
C++
//
|
|
// Created by stephane bourque on 2021-10-14.
|
|
//
|
|
|
|
#include "RESTAPI_blacklist_list.h"
|
|
#include "Poco/JSON/Parser.h"
|
|
#include "Poco/JSON/Stringifier.h"
|
|
#include "StorageService.h"
|
|
|
|
namespace OpenWifi {
|
|
void RESTAPI_blacklist_list::DoGet() {
|
|
|
|
std::vector<GWObjects::BlackListedDevice> Devices;
|
|
|
|
Poco::JSON::Array Arr;
|
|
Poco::JSON::Object Answer;
|
|
|
|
if(StorageService()->GetBlackListDevices(QB_.Offset, QB_.Limit, Devices)) {
|
|
for(const auto &i:Devices) {
|
|
Poco::JSON::Object O;
|
|
i.to_json(O);
|
|
Arr.add(O);
|
|
}
|
|
}
|
|
Answer.set("devices", Arr);
|
|
return ReturnObject(Answer);
|
|
}
|
|
} |