Changeset faff334 for pages/api/roulette


Ignore:
Timestamp:
07/18/22 13:59:55 (2 years ago)
Author:
anastasovv <simon@…>
Branches:
main
Children:
22367db
Parents:
e903234
Message:

Ability for admin to watch live games and for user to see games history

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pages/api/roulette/gameStates.js

    re903234 rfaff334  
    11import { calculateWinnings } from './calculateWinnings'
    22
    3 import { game } from '../postgre/index'
     3import { game, saveGameInHistory } from '../postgre/index'
    44
    55import axios from 'axios';
     
    7979            }
    8080        });
     81
     82        if (player.whichBets?.length > 0)
     83            saveGameInHistory('roulette', game, player.username)
    8184    }
    8285}
Note: See TracChangeset for help on using the changeset viewer.