Skip to content

Commit

Permalink
Test with the real bearer token vs the fake one (#2032)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrew <[email protected]>
  • Loading branch information
jzbahrai and andrewleith authored Jan 8, 2025
1 parent 791d2e5 commit 3a33b6f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/main/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def validate_callback_url(service_callback_url, bearer_token):
response = requests.post(
url=service_callback_url,
allow_redirects=True,
data={"health_check": "true"},
json={"health_check": True},
headers={"Content-Type": "application/json", "Authorization": f"Bearer {bearer_token}"},
timeout=2,
)
Expand Down
4 changes: 2 additions & 2 deletions app/main/views/api_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def delete_delivery_status_callback(service_id):

form = ServiceDeliveryStatusCallbackForm(
url=delivery_status_callback.get("url") if delivery_status_callback else "",
bearer_token=dummy_bearer_token if delivery_status_callback else "",
bearer_token=delivery_status_callback.get("bearer") if delivery_status_callback else "",
)

return render_template(
Expand All @@ -216,7 +216,7 @@ def delivery_status_callback(service_id):

form = ServiceDeliveryStatusCallbackForm(
url=delivery_status_callback.get("url") if delivery_status_callback else "",
bearer_token=dummy_bearer_token if delivery_status_callback else "",
bearer_token=delivery_status_callback.get("bearer") if delivery_status_callback else "",
)

if form.validate_on_submit():
Expand Down

0 comments on commit 3a33b6f

Please sign in to comment.