|
|
|
@ -10,6 +10,7 @@ from restoran_max_bot.bot_started import bot_started
|
|
|
|
from restoran_max_bot.bot_stopped import bot_stopped
|
|
|
|
from restoran_max_bot.bot_stopped import bot_stopped
|
|
|
|
from restoran_max_bot.bot_message import bot_message
|
|
|
|
from restoran_max_bot.bot_message import bot_message
|
|
|
|
from restoran_max_bot.common import common_get_contact
|
|
|
|
from restoran_max_bot.common import common_get_contact
|
|
|
|
|
|
|
|
from restoran_max_bot.settings import DEBUG
|
|
|
|
from restoran_max_bot.utils import is_json, has_key
|
|
|
|
from restoran_max_bot.utils import is_json, has_key
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -66,6 +67,7 @@ def api_start_max_v1(request, token, **kwargs):
|
|
|
|
client = kwargs['client']
|
|
|
|
client = kwargs['client']
|
|
|
|
settings_max = kwargs['settings_max']
|
|
|
|
settings_max = kwargs['settings_max']
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if DEBUG:
|
|
|
|
print(data)
|
|
|
|
print(data)
|
|
|
|
|
|
|
|
|
|
|
|
if not has_key(data, 'update_type'):
|
|
|
|
if not has_key(data, 'update_type'):
|
|
|
|
@ -117,7 +119,6 @@ def iiko_webhook(request: WSGIRequest, token):
|
|
|
|
@csrf_exempt
|
|
|
|
@csrf_exempt
|
|
|
|
def iiko_send_message(request: WSGIRequest, token):
|
|
|
|
def iiko_send_message(request: WSGIRequest, token):
|
|
|
|
rt = {'success': False, 'data': ''}
|
|
|
|
rt = {'success': False, 'data': ''}
|
|
|
|
# print(request.body)
|
|
|
|
|
|
|
|
if request.method == "POST":
|
|
|
|
if request.method == "POST":
|
|
|
|
data = json.loads(request.body)
|
|
|
|
data = json.loads(request.body)
|
|
|
|
client = Client.objects.filter(token=token).first()
|
|
|
|
client = Client.objects.filter(token=token).first()
|
|
|
|
|