aboutsummaryrefslogtreecommitdiffstats
path: root/arthur/apis/cloudflare/zones.py
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2021-07-27 23:31:29 +0100
committerGravatar GitHub <[email protected]>2021-07-27 23:31:29 +0100
commit46aff6c262c3f8ec8ff54db6b32f31b5ec97ef7e (patch)
tree1c4775a8bee693f56e6ef07eab3b2aa332814a87 /arthur/apis/cloudflare/zones.py
parentremove quotes from black profile (diff)
parentMigrate to discord.py v2.0 (diff)
Merge branch 'main' into patch-1
Diffstat (limited to 'arthur/apis/cloudflare/zones.py')
-rw-r--r--arthur/apis/cloudflare/zones.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/arthur/apis/cloudflare/zones.py b/arthur/apis/cloudflare/zones.py
index 7debfd1..81a54f1 100644
--- a/arthur/apis/cloudflare/zones.py
+++ b/arthur/apis/cloudflare/zones.py
@@ -5,9 +5,7 @@ import aiohttp
from arthur.config import CONFIG
-AUTH_HEADER = {
- "Authorization": f"Bearer {CONFIG.cloudflare_token}"
-}
+AUTH_HEADER = {"Authorization": f"Bearer {CONFIG.cloudflare_token}"}
async def list_zones(zone_name: Optional[str] = None) -> dict[str, str]:
@@ -30,9 +28,7 @@ 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_cache"
- request_body = {
- "purge_everything": True
- }
+ request_body = {"purge_everything": True}
async with aiohttp.ClientSession() as session:
async with session.post(endpoint, headers=AUTH_HEADER, json=request_body) as response: