mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-02 19:48:03 +00:00
25 lines
696 B
C++
25 lines
696 B
C++
//
|
|
// Created by stephane bourque on 2022-04-06.
|
|
//
|
|
|
|
#include "RESTAPI_operators_list_handler.h"
|
|
#include "RESTAPI/RESTAPI_db_helpers.h"
|
|
|
|
|
|
namespace OpenWifi {
|
|
void RESTAPI_operators_list_handler::DoGet() {
|
|
|
|
if(QB_.CountOnly) {
|
|
auto Count = DB_.Count();
|
|
return ReturnCountOnly(Count);
|
|
}
|
|
|
|
if(!QB_.Select.empty()) {
|
|
return ReturnRecordList<decltype(DB_), ProvObjects::Operator>("operators", DB_, *this);
|
|
}
|
|
|
|
std::vector<ProvObjects::Operator> Entries;
|
|
DB_.GetRecords(QB_.Offset,QB_.Limit,Entries);
|
|
return MakeJSONObjectArray("operators", Entries, *this);
|
|
}
|
|
} |