()
| 467 | |
| 468 | @app.route('/api/tg/start_monitoring', methods=['POST']) |
| 469 | def tg_start_monitoring(): |
| 470 | denied = require_sensitive_request("tg_start_monitoring", limit=10, window=60) |
| 471 | if denied: |
| 472 | return denied |
| 473 | data = request.json |
| 474 | target = data.get('target') |
| 475 | duration = data.get('duration', '1 Ora') |
| 476 | creds = core.creds.copy() |
| 477 | creds["tg_session"] = core.telegram_session() |
| 478 | return jsonify(run_async(tg_monitor.start_monitor(target, target, duration, creds))) |
| 479 | |
| 480 | @app.route('/api/tg/check_status', methods=['POST']) |
| 481 | def tg_check_status(): |
nothing calls this directly
no test coverage detected