ADD: added tournament creation without backend support
This commit is contained in:
@@ -53,6 +53,15 @@ export async function deleteTournament(id: string, token: string) {
|
||||
return res.json();
|
||||
}
|
||||
|
||||
export async function fetchPlayer(token: string, id: string) {
|
||||
const res = await fetch(`${API_URL}/players/${id}`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
if (!res.ok) throw new Error('Fehler beim Laden des Spielers');
|
||||
return res.json();
|
||||
|
||||
}
|
||||
|
||||
export async function fetchPlayers(token: string) {
|
||||
const res = await fetch(`${API_URL}/players`, {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
|
||||
Reference in New Issue
Block a user