From f9490ea071fa920a77e87f094ad7bd13ead13cfa Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Tue, 21 Oct 2025 10:03:01 -0700 Subject: fix: upstash rest token removal url --- notifications.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/notifications.py b/notifications.py index 0ec36cb..3791f00 100644 --- a/notifications.py +++ b/notifications.py @@ -61,11 +61,10 @@ def broadcast_to_topic(topic: str, title: str, body: str, image): if not error.success: failed_token = tokens[idx] print(f"Error for token {failed_token}: {error.exception}") - url = f"{upstash_rest_api_url}/srem/fcm-{topic}" + url = f"{upstash_rest_api_url}/srem/fcm-{topic}/{failed_token}" resp = requests.post( url, - headers={"Authorization": f"Bearer {upstash_token}"}, - json={"value": failed_token} + headers={"Authorization": f"Bearer {upstash_token}"} ) if resp.status_code != 200: print(f"Failed to remove token {failed_token} from topic '{topic}': {resp.text}") -- cgit v1.2.3