Changeset 433e0c5 for pages/api/blackjack
- Timestamp:
- 07/15/22 14:45:30 (2 years ago)
- Branches:
- main
- Children:
- 55701f0
- Parents:
- 1df3fde
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pages/api/blackjack/index.js
r1df3fde r433e0c5 6 6 import { calculateEarnings, calculateSideBetEarnings } from './calculateEarnings'; 7 7 8 let rooms = [] 8 import { rooms, update_rooms_to_database } from '../postgre/index' 9 9 10 10 /** … … 43 43 game: rooms[session_id], 44 44 }) 45 46 update_rooms_to_database(); 45 47 46 48 return ; … … 99 101 credits: postgreRes.data?.credits, 100 102 }) 103 104 update_rooms_to_database(); 101 105 } 102 106 else { … … 150 154 credits: postgreRes.data?.credits, 151 155 }) 156 157 update_rooms_to_database(); 152 158 } 153 159 else { … … 166 172 earnings: rooms[session_id].earnings, 167 173 }) 174 175 update_rooms_to_database(); 168 176 } 169 177 … … 212 220 credits: postgreRes.data?.credits, 213 221 }) 222 223 update_rooms_to_database(); 214 224 } 215 225 else { … … 229 239 sideBetEarnings: rooms[session_id].sideBetEarnings, 230 240 }) 241 242 update_rooms_to_database(); 231 243 } 232 244 … … 270 282 credits: postgreRes.data?.credits, 271 283 }) 284 285 update_rooms_to_database(); 272 286 } 273 287 }); … … 308 322 credits: postgreRes.data?.credits, 309 323 }) 324 325 update_rooms_to_database(); 310 326 } 311 327 else { … … 340 356 success: true, 341 357 }) 358 359 update_rooms_to_database(); 342 360 } 343 361 … … 390 408 credits: postgreRes.data?.credits, 391 409 }) 410 411 update_rooms_to_database(); 392 412 } 393 413 else {
Note:
See TracChangeset
for help on using the changeset viewer.