feat(админка): выбор всех по фильтру

This commit is contained in:
anor
2026-11-06 23:20:42 +10:00
parent e1c398e7fc
commit 70a710d135
5 changed files with 47 additions and 1 deletions
+11
View File
@@ -208,3 +208,14 @@ def export_zip(email: str) -> bytes | None:
if f.is_file() and f.stat().st_size <= 20 * 1024 * 1024:
z.write(f, "files/" + str(f.relative_to(root)))
return buf.getvalue()
def emails(query: str = "", status: str = "") -> list[str]:
out, page = [], 1
while True:
d = list_customers(query, status, page, 200, "last_seen")
out.extend(r["raw_email"] or r["email"] for r in d["items"])
if len(d["items"]) < 200:
break
page += 1
return out