Read slack token from env
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful

This commit is contained in:
Madis Mägi 2023-08-17 21:06:07 +03:00
parent a2b3d21f27
commit dcbc392e7c
2 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,7 @@ def get_group_cards():
@page_api.route("/api/slack/doorboy", methods=['POST'])
def view_slack_doorboy():
print(request.data)
if request.form.get("token") != "FSh3r8UE1vFHP4GrAn8SgZUY":
if request.form.get("token") != const.SLACK_TOKEN:
return "Invalid token was supplied"
if request.form.get("channel_id") not in ("C01CWPF5H8W", "CDL9H8Q9W"):
return "Invalid channel was supplied"

View File

@ -17,3 +17,4 @@ AWS_ENDPOINT_URL = os.environ["AWS_ENDPOINT_URL"]
INVENTORY_ASSETS_BASE_URL = os.environ["INVENTORY_ASSETS_BASE_URL"]
MONGO_URI = os.environ["MONGO_URI"]
MEMBERS_HOST = os.environ["MEMBERS_HOST"]
SLACK_TOKEN = os.environ["SLACK_TOKEN"]