diff --git a/app/api/serializer.py b/app/api/serializer.py index 7b8ab497..c2422ba0 100644 --- a/app/api/serializer.py +++ b/app/api/serializer.py @@ -139,6 +139,9 @@ def get_alias_infos_with_pagination_v2( or_(Alias.email.ilike(f"%{query}%"), Alias.note.ilike(f"%{query}%")) ) + if sort == "enabled": + q = q.filter(Alias.enabled) + if sort == "old2new": q = q.order_by(Alias.created_at) elif sort == "new2old": diff --git a/app/dashboard/templates/dashboard/index.html b/app/dashboard/templates/dashboard/index.html index 638d82fb..424e2103 100644 --- a/app/dashboard/templates/dashboard/index.html +++ b/app/dashboard/templates/dashboard/index.html @@ -81,6 +81,9 @@ +