const API_URL = 'http://localhost:8080/api';

export async function getTeams(token:string) 
{
    const res = await fetch(`${API_URL}/team/`, {
    headers: { Authorization: `Bearer ${token}` },
    });
  if (!res.ok) throw new Error('Fehler beim Laden des Spielers');
  return res.json();
}
