Add API channel deletion endpoint

This commit is contained in:
2022-08-14 00:01:00 +01:00
parent b6d229bbd2
commit 81708ef490
4 changed files with 67 additions and 6 deletions

View File

@@ -66,9 +66,8 @@ def get_irc_channels(net):
def part_channel(net, channel):
channel = urllib.parse.quote(channel, safe="")
url = f"irc/network/{net}/channel/{channel}"
payload = {}
url = f"irc/network/{net}/channel"
payload = {"channel": channel}
parted = threshold_request(url, payload, method="DELETE")
if not parted:
return {}