mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2024-12-30 15:19:18 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
dfdd5f4286
commit
fa06490818
@ -110,14 +110,18 @@ export default class DBLogPlayerTime extends DBLog {
|
||||
}
|
||||
console.log('players online:', playerOnlineID);
|
||||
const {ne, not, notIn, is} = Sequelize.Op;
|
||||
let updateVals = { leaveTime: lastServerTime };
|
||||
let whereStuff = {
|
||||
leaveTime: {[is]: null},
|
||||
server: this.options.overrideServerID || this.server.id,
|
||||
player: {[notIn]: playerOnlineID}
|
||||
};
|
||||
console.log(updateVals);
|
||||
console.log(whereStuff);
|
||||
let rowUpdate = await this.models.PlayerTime.update(
|
||||
{ leaveTime: lastServerTime },
|
||||
{ where: {
|
||||
leaveTime: {[is]: null},
|
||||
server: this.options.overrideServerID || this.server.id,
|
||||
player: {[notIn]: playerOnlineID}
|
||||
},
|
||||
logging: console.log
|
||||
updateVals, {
|
||||
where: whereStuff,
|
||||
logging: console.log
|
||||
}
|
||||
);
|
||||
console.log('updated playerTimes row count: %i', rowUpdate[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user