npm version upgrades and minor migration changes
This commit is contained in:
1 parent
721cd9c13d
commit
a1d1f7151f
9 files changed
+1447
-3372
No files matched your search
@@ -258,7 +258,7 @@ exports.findGameAcceptingAnswers = ( id ) => {
|
||||
exports.setPlayerPointsAndReturnGame = ( gameId, playerId, pointsAdjusted ) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
PlayerModel.findByIdAndUpdate(
|
||||
mongoose.Types.ObjectId( playerId ),
|
||||
new mongoose.Types.ObjectId( playerId ),
|
||||
{
|
||||
$set: {
|
||||
points: pointsAdjusted,
|
||||
@@ -328,7 +328,7 @@ exports.addGame = (hostId) => {
|
||||
*/
|
||||
exports.deleteGame = ( gameId ) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
GameModel.findByIdAndRemove( gameId )
|
||||
GameModel.findByIdAndDelete( gameId )
|
||||
.then( ( game ) => {
|
||||
if( game === null ){
|
||||
throw new Error( "No Game found for deletion" );
|
||||
|
||||
Reference in new issue
Block a user