Estrae la deduplica degli id giocatore in idsConNotificheAttive (src/lib/notifiche-attive.server.ts), testata a livello unit. Aggiunge un test di integrazione sui permessi della route (401/403/200), sullo stesso schema di permessi-route.test.ts. Documenta il nuovo endpoint in notifiche.md e la dashboard admin a tab in profilo-giocatore.md. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
5 lines
243 B
TypeScript
5 lines
243 B
TypeScript
/** Id giocatore distinti tra le righe di `push_subscriptions` (una riga per dispositivo). */
|
|
export function idsConNotificheAttive(righe: Array<{ giocatore_id: string }>): string[] {
|
|
return [...new Set(righe.map((r) => r.giocatore_id))];
|
|
}
|