Skip to content

Commit

Permalink
nit
Browse files Browse the repository at this point in the history
  • Loading branch information
jagnani73 committed Sep 7, 2024
1 parent e5bd196 commit 455a4a3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../../utils/functions";
import {
addPlayer2ToGame,
createGame,
createDBGame,
fetchPlayersDetailsForPlayedGame,
setWinnerToGame,
} from "../played-games/played-games.service";
Expand Down Expand Up @@ -50,7 +50,7 @@ export const ConnectFourRoutes = async (socket: Socket, io: Namespace) => {
`no room found for room key ${roomKey}`,
);

const { played_game_id } = await createGame(
const { played_game_id } = await createDBGame(
player_id,
season_id,
game_id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const setAttestationAndWithdrawRewards = async (
return playedGameData;
};

export const createGame = async (
export const createDBGame = async (
player_1_id: MappedPlayedGame["player_1_id"],
season_id: MappedPlayedGame["season_id"],
game_id: MappedPlayedGame["game_id"],
Expand Down Expand Up @@ -81,7 +81,8 @@ export const addPlayer2ToGame = async (
is_active: true,
})
.eq("played_game_id", played_game_id)
.select();
.select()
.single();

if (error) {
console.error(error);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "../../utils/functions";
import {
addPlayer2ToGame,
createGame,
createDBGame,
fetchPlayersDetailsForPlayedGame,
setWinnerToGame,
} from "../played-games/played-games.service";
Expand Down Expand Up @@ -52,7 +52,7 @@ export const RockPaperScissorsRoutes = async (
`no room found for room key ${roomKey}`,
);

const { played_game_id } = await createGame(
const { played_game_id } = await createDBGame(
player_id,
season_id,
game_id,
Expand Down

0 comments on commit 455a4a3

Please sign in to comment.