fix(sorting): fixed sorting for scans and sessions

This commit is contained in:
2025-01-24 15:59:08 +01:00
parent 6a4557c0c4
commit f55adfe5c9
2 changed files with 7 additions and 0 deletions

View File

@ -84,6 +84,9 @@ class ScanRouter(BaseRouter):
filter = json.loads(filter)
filters.update(filter)
if sort:
sort = json.loads(sort)
return self.db.find(
"scans",
filters,

View File

@ -67,6 +67,10 @@ class SessionRouter(BaseRouter):
for field in fields
if field in Session.model_json_schema()["properties"].keys()
}
if sort:
sort = json.loads(sort)
return self.db.find(
"sessions",
filter,