mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Attempt #3 to fix chat filter and missing index
This commit is contained in:
parent
2a82fee9d5
commit
f5c342c785
1 changed files with 37 additions and 22 deletions
|
@ -1502,7 +1502,17 @@ function updateAllChat(clear){
|
|||
//document.getElementById("list-tab").childNodes.remove();
|
||||
//document.getElementById("nav-tab-content").childrenNodes.remove();
|
||||
}
|
||||
|
||||
//Ensure we create an index before running db.find
|
||||
//We can't rely on the default index existing before we get here...... :'(
|
||||
db.createIndex({
|
||||
index: {
|
||||
fields: [
|
||||
{"timestamp":"asc"},
|
||||
],
|
||||
},
|
||||
})
|
||||
.then(function (result) {
|
||||
// handle result
|
||||
db.find({
|
||||
selector: {
|
||||
$and: [{timestamp: {$exists:true}},
|
||||
|
@ -1532,4 +1542,9 @@ function updateAllChat(clear){
|
|||
.catch(function (err) {
|
||||
console.log(err);
|
||||
});
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.log(err);
|
||||
});
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue