|
@@ -88,6 +88,15 @@ export const linkGame = async (gameId, linkedGame) => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+export const getFirstSubmitter = async (gameId, round) => {
|
|
|
+ const res = await fetch(`${API_BASE}/game/${gameId}/round/${round}/first`);
|
|
|
+ if (!res.ok) {
|
|
|
+ return null; // API is that 404 means no submitter yet (or wrong game)
|
|
|
+ }
|
|
|
+ const { first } = await res.json();
|
|
|
+ return first;
|
|
|
+}
|
|
|
+
|
|
|
export const joinGame = async (gameId, playerName) => {
|
|
|
const res = await fetch(`${API_BASE}/game/${gameId}/join`, {
|
|
|
method: "POST",
|