feat(админка): выбор всех по фильтру
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user