mirror of
https://github.com/AsgardEternal/SquadJSDocker.git
synced 2025-01-02 12:09:20 -06:00
Update db-log-addOn.js
This commit is contained in:
parent
2402b53b09
commit
bf032ac302
@ -1,5 +1,4 @@
|
|||||||
import Sequelize from 'sequelize';
|
import Sequelize from 'sequelize';
|
||||||
import Op from 'sequelize';
|
|
||||||
|
|
||||||
import DBLog from './db-log.js';
|
import DBLog from './db-log.js';
|
||||||
|
|
||||||
@ -107,13 +106,13 @@ export default class DBLogPlayerTime extends DBLog {
|
|||||||
playerOnlineID.push(player.steamID);
|
playerOnlineID.push(player.steamID);
|
||||||
}
|
}
|
||||||
console.log('players online:', playerOnlineID);
|
console.log('players online:', playerOnlineID);
|
||||||
// const {ne, not, in} = Sequelize.Op;
|
const {ne, not, in: opIn, is} = Sequelize.Op;
|
||||||
let rowUpdate = await this.models.PlayerTime.update(
|
let rowUpdate = await this.models.PlayerTime.update(
|
||||||
{ leaveTime: lastServerTime },
|
{ leaveTime: lastServerTime },
|
||||||
{ where: {
|
{ where: {
|
||||||
leaveTime: {[Op.is]: null},
|
leaveTime: {[is]: null},
|
||||||
server: this.options.overrideServerID || this.server.id,
|
server: this.options.overrideServerID || this.server.id,
|
||||||
player: { [Op.ne]: {[Op.in]: playerOnlineID} }
|
player: { [ne]: {[opIn]: playerOnlineID} }
|
||||||
} },
|
} },
|
||||||
{ logging: console.log }
|
{ logging: console.log }
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user