(admin_id: int)
| 37 | |
| 38 | |
| 39 | def calculate_admin_usage(admin_id: int) -> str: |
| 40 | with GetDB() as db: |
| 41 | usage = db.query(func.sum(User.used_traffic)).filter_by(admin_id=admin_id).first()[0] |
| 42 | return readable_size(int(usage or 0)) |
| 43 | |
| 44 | |
| 45 | def calculate_admin_reseted_usage(admin_id: int) -> str: |
no test coverage detected