Fixing list handlers

This commit is contained in:
stephb9959
2022-02-25 22:26:08 -08:00
parent 63484acb63
commit 6a9d0cee55
17 changed files with 177 additions and 122 deletions

View File

@@ -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);
}
}