Added comments

This commit is contained in:
2022-04-12 11:36:23 +02:00
parent f47ab2362b
commit 24c2702f10
11 changed files with 132 additions and 57 deletions

View File

@@ -24,11 +24,13 @@ __location__ = os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file
def add_keyword(data):
email = get_email_or_abort_401()
# Check if request data is valid
if not check_if_telegram_user_id_data_exists(data):
abort(400, message="User ID missing")
query_user = get_user(email)
# Change user id
query_user.telegram_user_id = data['telegram_user_id']
db.session.commit()