fix: Schocken - Testmodus nutzt apiAs für alle Aktionen

This commit is contained in:
2026-07-05 00:24:20 +02:00
parent 1806d0bdfe
commit 3e75333b6a

View File

@@ -464,25 +464,25 @@ function GameView({ game, myId, onRefresh, toast, isAdmin=false, onSeatChange })
const currentPlayer = activePlayers[game.current_player_idx % activePlayers.length];
const handleRoll = async (keepDice, flipSixes, goDark) => {
await api(`/tools/schocken/${game.id}/roll`, {
await apiAs(myId, `/tools/schocken/${game.id}/roll`, {
body: { keep_dice: keepDice, flip_sixes: flipSixes, go_dark: goDark }
});
onRefresh();
};
const handleReady = async () => {
await api(`/tools/schocken/${game.id}/ready`, { body: {} });
await apiAs(myId, `/tools/schocken/${game.id}/ready`, { body: {} });
onRefresh();
};
const handleEvaluate = async () => {
const result = await api(`/tools/schocken/${game.id}/evaluate`, { body: {} });
const result = await apiAs(myId, `/tools/schocken/${game.id}/evaluate`, { body: {} });
if (result.round_result?.eventMsg) toast(result.round_result.eventMsg);
onRefresh();
};
const handleStart = async () => {
await api(`/tools/schocken/${game.id}/start`, { body: {} });
await apiAs(myId, `/tools/schocken/${game.id}/start`, { body: {} });
onRefresh();
};