mirror of
https://github.com/Telecominfraproject/wlan-cloud-owprov.git
synced 2025-11-01 19:17:47 +00:00
Fixing list handlers
This commit is contained in:
@@ -11,17 +11,6 @@
|
||||
namespace OpenWifi{
|
||||
|
||||
void RESTAPI_location_list_handler::DoGet() {
|
||||
if(!QB_.Select.empty()) {
|
||||
return ReturnRecordList<decltype(DB_),
|
||||
ProvObjects::Location>("locations",DB_,*this );
|
||||
} else if(QB_.CountOnly) {
|
||||
Poco::JSON::Object Answer;
|
||||
auto C = DB_.Count();
|
||||
return ReturnCountOnly(C);
|
||||
} else {
|
||||
LocationDB::RecordVec Locations;
|
||||
DB_.GetRecords(QB_.Offset,QB_.Limit,Locations);
|
||||
return MakeJSONObjectArray("locations", Locations, *this);
|
||||
}
|
||||
return ListHandler<LocationDB>("locations", DB_, *this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user