flask_app.py 291 B

123456789101112
  1. from flask import Flask, request
  2. from slack_bolt.adapter.flask import SlackRequestHandler
  3. from archivebot import app
  4. flask_app = Flask(__name__)
  5. handler = SlackRequestHandler(app)
  6. @flask_app.route("/slack/events", methods=["POST"])
  7. def slack_events():
  8. return handler.handle(request)