diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2018-06-13 14:32:14 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2018-12-13 17:09:19 +0100 |
| commit | d1e48e8fdfbbd348f94c270cd7e635308fec55db (patch) | |
| tree | 35e1aafec7bb6d4519b988b110ab195cfadc4566 /backend/index.js | |
| parent | aaaa0901078567bfa3ba565b2a2fa28e8c83f23f (diff) | |
| download | brokentalents-d1e48e8fdfbbd348f94c270cd7e635308fec55db.tar.gz brokentalents-d1e48e8fdfbbd348f94c270cd7e635308fec55db.zip | |
Switch backend to 3.4
Diffstat (limited to 'backend/index.js')
| -rw-r--r-- | backend/index.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/backend/index.js b/backend/index.js index 8480f28..3c090f7 100644 --- a/backend/index.js +++ b/backend/index.js @@ -16,9 +16,13 @@ const cleanPayloads = reduce.cleanPayloads(config.reduce); const saveFPayloads = file.saveFPayloads(config.file); function main() { - const start = moment('2018-05-16 16Z'); + const start = moment(config.api.startDate); const end = moment().utc(); const duration = moment.duration(end.diff(start)); + if (start.isAfter(end)) { + console.error(`Start date '${start}' is in the future, exiting.`); + return; + } const later = R.curry((base, hs) => base.clone().add(hs, 'hours')); const hours = R.range(0, Math.floor(duration.asHours())); |
