Skip to content
Snippets Groups Projects
Commit 06c83401 authored by murych's avatar murych
Browse files

табы на пробелы


Signed-off-by: default avatarmurych <murychkun@yahoo.com>
parent bf358450
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -6,29 +6,31 @@ from message import *
 
app = Flask(__name__)
 
@app.route('/')
def index():
return render_template('index.html')
return render_template('index.html')
 
 
@app.route('/callback/xE4sA', methods=['GET', 'POST'])
def callback():
if not request.json or 'type' not in request.json:
abort(400)
if not request.json or 'type' not in request.json:
abort(400)
 
if request.json['type'] == 'confirmation':
return confirmation_token_
if request.json['type'] == 'confirmation':
return confirmation_token_
 
if request.json['type'] == 'wall_post_new':
post = request.json['object']
if request.json['type'] == 'wall_post_new':
post = request.json['object']
 
slack_message = Slack(post=post).create_message()
Slack.send_message(auth=slack, channel=channel_, text=text_, attachments=slack_message)
attachments = Slack(post=post).create_attachments()
Slack.send_message(auth=slack, channel=channel_, text=text_,
attachments=attachments)
 
return 'ok', 200
return 'ok', 200
 
 
slack = auth_slack()
 
if __name__ == '__main__':
app.run(host="0.0.0.0", port=5000)
app.run(host="0.0.0.0", port=5000)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment