Skip to content

Commit a1f1ee1

Browse files
committed
wip
1 parent c7b7028 commit a1f1ee1

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ COPY . .
3030
ENV PYTHONPATH /app/packages
3131

3232

33-
CMD ["gunicorn", "--bind", "0.0.0.0:8080", "main:app"]
33+
CMD ["main.py"]

main.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77

88
@app.route('/webhook', methods=['POST'])
99
def webhook():
10-
if request.method == "POST":
11-
update = telegram.Update.de_json(request.get_json(force=True), bot)
12-
chat_id = update.message.chat.id
13-
14-
bot.sendMessage(chat_id=chat_id, text=update.message.text)
10+
update = telegram.Update.de_json(request.get_json(force=True), bot)
11+
chat_id = update.message.chat.id
12+
bot.sendMessage(chat_id=chat_id, text=update.message.text)
1513
return "OK"
1614

1715
if __name__ == "__main__":
18-
app.run(debug=True, host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))
16+
app.run(host='0.0.0.0', port=int(os.environ.get('PORT', 8080)))

0 commit comments

Comments
 (0)