Update db-log-addOn.js

This commit is contained in:
Skillet 2023-03-04 10:45:46 -05:00 committed by GitHub
parent 1afde41836
commit 06672d1edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,13 +105,12 @@ export default class DBLogPlayerTime extends DBLog {
playerOnlineID.push(player.steamID);
}
console.log('players online:', playerOnlineID);
const Op = require('sequelize').Op;
let rowUpdate = await this.models.PlayerTime.update(
{ leaveTime: lastServerTime },
{ where: {
leaveTime: null,
server: this.options.overrideServerID || this.server.id,
[Op.ne]: { player: playerOnlineID }
$not: { player: playerOnlineID }
} },
{ logging: console.log }
);