From 9b6eb9e10b70e2e425f87876bfb0257dc6067493 Mon Sep 17 00:00:00 2001 From: rasmus Date: Thu, 17 Aug 2023 21:13:42 +0300 Subject: [PATCH] move callback to env --- inventory-app/common.py | 2 +- inventory-app/const.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/inventory-app/common.py b/inventory-app/common.py index afc7024..4bffae6 100644 --- a/inventory-app/common.py +++ b/inventory-app/common.py @@ -95,7 +95,7 @@ def spam(msg): if devenv: print(msg) else: - url = "https://hooks.slack.com/services/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" + url = const.SLACK_CALLBACK requests.post(url, json={"text": msg }) def build_query(base_query, fields=[], sort_fields={}): diff --git a/inventory-app/const.py b/inventory-app/const.py index cbb5a2c..3ca09e0 100644 --- a/inventory-app/const.py +++ b/inventory-app/const.py @@ -18,3 +18,4 @@ 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"] +SLACK_CALLbACK = os.environ["SLACK_CALLBACK"]