bLOQUE p1 BACKEND Y SEGURIDAD, AUTENTICACION CON SUPABASE. jwt. RBAC CRUD
This commit is contained in:
@@ -23,8 +23,11 @@ def init_firebase(cred_path: str):
|
||||
print(f"ADVERTENCIA: Credenciales no encontradas en '{cred_path}'.")
|
||||
print("Las notificaciones se ejecutarán en modo SIMULADO (solo consola).")
|
||||
|
||||
def send_to_topic(topic: str, title: str, body: str):
|
||||
def send_to_topic(topic: str, payload: dict):
|
||||
"""Envía una notificación push a todos los dispositivos suscritos a un topic (ej. RUTA-01)."""
|
||||
title = payload.get("title", "")
|
||||
body = payload.get("body", "")
|
||||
|
||||
if not _firebase_initialized:
|
||||
print(f"[MOCK PUSH] -> Topic: {topic} | Título: '{title}' | Mensaje: '{body}'")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user