From b3c53e55276928d6afadb0ef7155b06b845590d4 Mon Sep 17 00:00:00 2001 From: pilot <657434@03b.ru> Date: Mon, 25 May 2026 08:01:13 +0800 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BD=D0=B5=D0=B4=D1=80=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- restoran_max_bot/restoran_max_bot/bot_message.py | 2 +- restoran_max_bot/restoran_max_bot/rkiper_api.py | 3 ++- restoran_max_bot/restoran_max_bot/urls.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/restoran_max_bot/restoran_max_bot/bot_message.py b/restoran_max_bot/restoran_max_bot/bot_message.py index 7128009..0f4043b 100644 --- a/restoran_max_bot/restoran_max_bot/bot_message.py +++ b/restoran_max_bot/restoran_max_bot/bot_message.py @@ -54,7 +54,7 @@ def get_bonus(client: Client, phone: str, default_bonus: float, contact: Contact else: birthday = f"1990-{month}-{date}" rs = rkiper_customer_create(rkiper_server=config['url'], rkiper_token=config['token'], phone=phone, - name=contact.name, birthday=birthday) + name=contact.name, birthday=birthday, card_type=config['card_type']) bonus = 0 return bonus diff --git a/restoran_max_bot/restoran_max_bot/rkiper_api.py b/restoran_max_bot/restoran_max_bot/rkiper_api.py index f335cac..779c197 100644 --- a/restoran_max_bot/restoran_max_bot/rkiper_api.py +++ b/restoran_max_bot/restoran_max_bot/rkiper_api.py @@ -26,7 +26,7 @@ def rkiper_customer_info(rkiper_server, rkiper_token, phone): return response -def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday): +def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday, card_type="16"): url = f"http://{rkiper_server}/cardimp" phone = normalize_mobile_phone(phone) payload = json.dumps([{ @@ -36,6 +36,7 @@ def rkiper_customer_create(rkiper_server, rkiper_token, phone, name, birthday): "phone1": f"{phone}", "phone2": f"{phone}", "email": f"{phone}", + "card_type": card_type, "birthday": f"{birthday}", "department": "max bot", }]) diff --git a/restoran_max_bot/restoran_max_bot/urls.py b/restoran_max_bot/restoran_max_bot/urls.py index 44a4d08..341e0fc 100644 --- a/restoran_max_bot/restoran_max_bot/urls.py +++ b/restoran_max_bot/restoran_max_bot/urls.py @@ -3,5 +3,6 @@ from django.urls import path, include urlpatterns = [ # path('admin/', admin.site.urls), - path('max/', include('max_bot.urls')) + path('max/', include('max_bot.urls')), + path('content/', include('content_bot.urls')) ]