update
This commit is contained in:
@@ -38,10 +38,8 @@ app.get('/type/:type/startDate/:startDate/endDate/:endDate/sample/:sample', asyn
|
||||
$ne: NaN
|
||||
}
|
||||
}
|
||||
console.time()
|
||||
try {
|
||||
const docs = await db.collection('dht22').find(query).toArray()
|
||||
console.timeEnd()
|
||||
const sampledDocs = docs
|
||||
.filter((value, index) => index % sample === 0)
|
||||
.map(doc => {
|
||||
@@ -61,6 +59,6 @@ function dateFromObjectId(objectId) {
|
||||
return Math.floor(mongo.ObjectId(objectId).getTimestamp().getTime() / 1000)
|
||||
};
|
||||
|
||||
app.use(express.static(path.join(__dirname, 'dist')))
|
||||
app.use(express.static(path.join(__dirname, '../dist')))
|
||||
|
||||
module.exports = app
|
||||
|
||||
Reference in New Issue
Block a user