aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/cloudflare/zones.py
diff options
context:
space:
mode:
authorGravatar Vivaan Verma <[email protected]>2021-07-22 12:28:40 +0100
committerGravatar GitHub <[email protected]>2021-07-22 12:28:40 +0100
commitab813c412602aa64c9b0b822fed8becfcbc29fc1 (patch)
tree553d6011402d36cc9879c2024e68bb570ef6d03d /arthur/apis/cloudflare/zones.py
parentFix and refactor (diff)
Change constant name
Co-authored-by: Joe Banks <[email protected]>
Diffstat (limited to 'arthur/apis/cloudflare/zones.py')
-rw-r--r--arthur/apis/cloudflare/zones.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/arthur/apis/cloudflare/zones.py b/arthur/apis/cloudflare/zones.py
index e027a9a..ecf17cd 100644
--- a/arthur/apis/cloudflare/zones.py
+++ b/arthur/apis/cloudflare/zones.py
@@ -30,12 +30,12 @@ async def purge_zone(zone_identifier: str) -> dict:
"""Purge the cache for a Cloudflare zone."""
endpoint = f"https://api.cloudflare.com/client/v4/zones/{zone_identifier}"
- PURGE_EVERYTHING = {
+ request_body = {
"purge_everything": True
}
async with aiohttp.ClientSession() as session:
- async with session.post(endpoint, headers=AUTH_HEADER, body=PURGE_EVERYTHING) as response:
+ async with session.post(endpoint, headers=AUTH_HEADER, body=request_body) as response:
info = await response.json()
return {"success": info["success"], "errors": info["errors"]}