aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-21 10:03:01 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-21 10:03:01 -0700
commitf9490ea071fa920a77e87f094ad7bd13ead13cfa (patch)
tree027fdef7f903d1c20d491121fcf749cf1df0e8ed
parent81c4b758b7ee1a34c7233ded857b29d99bedafb3 (diff)
fix: upstash rest token removal url
-rw-r--r--notifications.py5
1 files 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}")
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage