New admin panel
This commit is contained in:
1 parent
3ddf5628d8
commit
3370d5c132
5 files changed
+147
-75
No files matched your search
+5
-1
@@ -61,7 +61,11 @@ class Handler(BaseHTTPRequestHandler):
|
||||
query = parse_qs(urlparse(self.path).query)
|
||||
sort_by = query.get("sort", ["escort_id"])[0]
|
||||
descending = query.get("direction", ["desc"])[0] != "asc"
|
||||
self._json(200, {"items": history_store().list_calculations(sort_by=sort_by, descending=descending)})
|
||||
try:
|
||||
limit = int(query.get("limit", ["100"])[0])
|
||||
except ValueError:
|
||||
limit = 100
|
||||
self._json(200, {"items": history_store().list_calculations(sort_by=sort_by, descending=descending, limit=limit)})
|
||||
return
|
||||
requested = unquote(path).lstrip("/")
|
||||
candidate = (WEB_ROOT / requested).resolve()
|
||||
|
||||
Reference in new issue
Block a user