Skip to content

Commit 6e1392d

Browse files
authored
Merge pull request #120 from stfc/chatops_fixes
BUG: Flask request object has json dict not function
2 parents 634387d + 2b68910 commit 6e1392d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

cloud-chatops/deployments/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ spec:
1919
spec:
2020
containers:
2121
- name: cloud-chatops
22-
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:8.0.0
22+
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:8.0.1
2323
env:
2424
- name: HOST_IP
2525
valueFrom:

cloud-chatops/deployments/docker-compose.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
cloud_chatops:
3-
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:8.0.0
3+
image: harbor.stfc.ac.uk/stfc-cloud/cloud-chatops:8.0.1
44
volumes:
55
- /etc/chatops/secrets/:/usr/src/app/cloud_chatops/secrets/
66
- /etc/chatops/config/:/usr/src/app/cloud_chatops/config/

cloud-chatops/src/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def slack_events() -> slack_handler.handle:
7171
@flask_app.route("/slack/schedule", methods=["POST"])
7272
def slack_schedule() -> Tuple[str, int]:
7373
"""This function checks the request is authorised then passes it to the weekly reminder calls."""
74-
flask_app.logger.info(request.json())
74+
flask_app.logger.info(request.json)
7575
token = request.headers.get("Authorization")
7676
if token != "token " + get_token("SCHEDULED_REMINDER_TOKEN"):
7777
flask_app.logger.warning(
@@ -84,7 +84,7 @@ def slack_schedule() -> Tuple[str, int]:
8484
weekly_reminder(request.json)
8585
flask_app.logger.info(
8686
"Request on /slack/schedule by %s executed successfully "
87-
"for reminder type %s.", request.remote_addr, request.json()["reminder_type"]
87+
"for reminder type %s.", request.remote_addr, request.json["reminder_type"]
8888
)
8989
return "OK", 200
9090

cloud-chatops/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.0.0
1+
8.0.1

0 commit comments

Comments
 (0)