diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-12 16:32:51 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-12 16:32:51 +0200 |
| commit | 5051f67f651d318d007439553364cb164846935f (patch) | |
| tree | e9d6340b15012e8a124a3f44a0c81ad8ce1ff803 | |
| parent | e2054f2fe6cd54d505679673cafdd47b43f2f1aa (diff) | |
| download | bridge-5051f67f651d318d007439553364cb164846935f.tar.gz bridge-5051f67f651d318d007439553364cb164846935f.zip | |
add TODO for later
| -rw-r--r-- | server.js | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -245,14 +245,8 @@ async function updatePlayer(player, category) { // set last_update and request an update job // if last_update is null, we need that player's full history let grabstart; - if (player.get("last_update") != null) { - const last_match = await databaseForCategory(category).Participant.findOne({ - where: { player_api_id: player.get("api_id") }, - attributes: ["created_at"], - order: [ [seq.col("created_at"), "DESC"] ] - }); - if (last_match != null) grabstart = last_match.get("created_at"); - } + if (player.get("last_update") != null) + grabstart = player.get("created_at"); // TODO add 1s here!!! if (grabstart == undefined) grabstart = defaultGrabstartForCategory(category); else // add 1s, because createdAt-start <= x <= createdAt-end |
