From 41a5561713dcca9bf742ac3b908e6eaedbfc8839 Mon Sep 17 00:00:00 2001 From: "serafim.urukov" Date: Wed, 4 Aug 2021 00:06:14 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D1=87=D0=B8=D0=BD=D0=B8=D0=BB=20?= =?UTF-8?q?=D0=BE=D0=B1=D0=B5=D1=80=D1=82=D0=BA=D1=83,=20=D0=B8=D1=81?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1?= =?UTF-8?q?=D0=BA=D1=83=20=D0=B2=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B8=20=D0=B0=D0=B2=D1=82=D0=BE=D1=80=D0=B8=D0=B7?= =?UTF-8?q?=D0=B0=D1=86=D0=B8=D0=B8,=20=D0=BF=D0=BE=D0=BF=D1=80=D0=B0?= =?UTF-8?q?=D0=B2=D0=B8=D0=BB=20=D0=BB=D0=BE=D0=B3=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpreadsheetsService/app.py | 7 +++++-- TelegramBot/bot.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/SpreadsheetsService/app.py b/SpreadsheetsService/app.py index 5263a2d..8039bd2 100644 --- a/SpreadsheetsService/app.py +++ b/SpreadsheetsService/app.py @@ -5,7 +5,10 @@ import logging import models import time +logging.basicConfig() LOG = logging.getLogger(__name__) +LOG.setLevel(logging.DEBUG) + app = flask.Flask(__name__) app.db = None try: @@ -26,7 +29,8 @@ def availability(func): def wrapper(*args, **kwargs): if app.db is None: return flask.jsonify(dict(error=True, message=app.db_error)), 500 - func(*args, **kwargs) + result = func(*args, **kwargs) + return result return wrapper @@ -42,7 +46,6 @@ def auth(): token = flask.request.args.get("token") tg_id = flask.request.args.get("tg_id") student = app.db.get_student_by_name("Дзюба") - student = Student(1, "Фарид Михайлов", 5374) return flask.jsonify(student) diff --git a/TelegramBot/bot.py b/TelegramBot/bot.py index de2967f..9897abb 100644 --- a/TelegramBot/bot.py +++ b/TelegramBot/bot.py @@ -55,7 +55,7 @@ def start(update: Update, context: CallbackContext): update.message.reply_sticker(MESSAGES.stickers.DEAD) return - context.bot.send_message( + update.message.reply_text( text=MESSAGES.auth.hello(data), )