mirror of
https://github.com/Telecominfraproject/wlan-cloud-analytics.git
synced 2026-01-27 10:22:33 +00:00
Framework update.
This commit is contained in:
@@ -34,7 +34,7 @@ namespace OpenWifi {
|
||||
|
||||
auto orderBy = GetParameter("orderBy");
|
||||
if(orderBy.empty()) {
|
||||
orderBy = " timestamp DESC";
|
||||
orderBy = " order by timestamp DESC";
|
||||
} else {
|
||||
auto tokens = Poco::StringTokenizer(orderBy,":",Poco::StringTokenizer::TOK_TRIM);
|
||||
if(tokens.count()!=2 || (tokens[1]!="a" && tokens[1]!="d")) {
|
||||
@@ -43,7 +43,7 @@ namespace OpenWifi {
|
||||
if(!StorageService()->WifiClientHistoryDB().ValidFieldName(tokens[0])) {
|
||||
return BadRequest(RESTAPI::Errors::MissingOrInvalidParameters);
|
||||
}
|
||||
orderBy = fmt::format(" {} {}",tokens[0] , tokens[1]=="a" ? "asc" : "desc");
|
||||
orderBy = fmt::format(" order by {} {}",tokens[0] , tokens[1]=="a" ? "asc" : "desc");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user