From 2514b557e7294ef71c1ac8561d66052de8bad9df Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Thu, 24 Apr 2025 21:20:05 +0100 Subject: [PATCH] qr-verify: Push to fam's alert channel --- api/products/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/products/views.py b/api/products/views.py index 711f4cd..2ae604a 100644 --- a/api/products/views.py +++ b/api/products/views.py @@ -756,6 +756,10 @@ class QrVerifyView(BaseView): if sd.code and not settings.DEBUG: cmd = [MANAGE_PY, 'qrrepeatalert', code] subprocess.Popen(cmd) + try: + requests.post('https://euphon-alert-23358.famzheng.workers.dev/', data=f'qr-verify: {resp}, messages: {messages}') + except Exception as e: + print(f"Failed to send qr-verify alert: {e}") return JsonResponse(resp) class CheckAutoTorchView(BaseView):