Changeset e9f11ac for pages/api/roulette
- Timestamp:
- 07/12/22 17:03:03 (2 years ago)
- Branches:
- main
- Children:
- 1df3fde
- Parents:
- d0ef259
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/api/roulette/index.js
rd0ef259 re9f11ac 1 1 import axios from 'axios'; 2 3 import { game, update_game_to_database } from '../postgre/index' 2 4 3 5 require('dotenv').config(); … … 141 143 })(); 142 144 143 let game ={144 status: '_1_ongoing_timer', // statuses: _1_ongoing_timer, _2_spinning,145 timeToStart: 30,// in seconds146 COUNTDOWN_FROM: 30,147 WAIT_BEFORE: 20,148 magicNumber: -1,149 winningBets: [],150 players: [],145 if (game.status === undefined) { 146 game.status = '_1_ongoing_timer'; // statuses: _1_ongoing_timer, _2_spinning 147 game.timeToStart = 30; // in seconds 148 game.COUNTDOWN_FROM = 30; 149 game.WAIT_BEFORE = 20; 150 game.magicNumber = -1; 151 game.winningBets = []; 152 game.players = []; 151 153 } 152 154 … … 262 264 } 263 265 266 if (game.loaded !== undefined && game.loaded) { 267 update_game_to_database(); 268 } 269 264 270 res.json({ 265 271 success: true,
Note:
See TracChangeset
for help on using the changeset viewer.