()
| 22052 | |
| 22053 | @app.route('/api/tg/export_participants', methods=['GET']) |
| 22054 | def tg_export_csv(): |
| 22055 | denied = require_authenticated_download("tg_export_participants", limit=20, window=60) |
| 22056 | if denied: |
| 22057 | return denied |
| 22058 | entity_id = request.args.get('entity') |
| 22059 | if not entity_id: return "Errore: ID mancante.", 400 |
| 22060 | |
| 22061 | csv_data = run_async(core.get_tg_participants_csv(entity_id)) |
| 22062 | |
| 22063 | return Response( |
| 22064 | csv_data, |
| 22065 | mimetype="text/csv", |
| 22066 | headers={"Content-disposition": f"attachment; filename=Telegram_Export_{entity_id}.csv"} |
| 22067 | ) |
| 22068 | |
| 22069 | @app.route('/api/export', methods=['POST']) |
| 22070 | def export(): |
nothing calls this directly
no test coverage detected