mirror of
https://github.com/bunny-lab-io/Borealis.git
synced 2025-10-26 17:41:58 -06:00
Updated Atgents.md and Approval Queue Logic
This commit is contained in:
@@ -246,7 +246,8 @@ def register(
|
||||
|
||||
@blueprint.route("/api/admin/device-approvals", methods=["GET"])
|
||||
def list_device_approvals():
|
||||
status = request.args.get("status", "pending")
|
||||
status_raw = request.args.get("status")
|
||||
status = (status_raw or "").strip().lower()
|
||||
approvals: List[Dict[str, Any]] = []
|
||||
conn = db_conn_factory()
|
||||
try:
|
||||
@@ -268,8 +269,8 @@ def register(
|
||||
approved_by_user_id
|
||||
FROM device_approvals
|
||||
"""
|
||||
if status:
|
||||
sql += " WHERE status = ?"
|
||||
if status and status != "all":
|
||||
sql += " WHERE LOWER(status) = ?"
|
||||
params.append(status)
|
||||
sql += " ORDER BY created_at ASC"
|
||||
cur.execute(sql, params)
|
||||
|
||||
Reference in New Issue
Block a user