19 lines
559 B
JavaScript
19 lines
559 B
JavaScript
(() => {
|
|
let msis = (async () => {
|
|
return await AutomaticDisposeCall.ADisDB.ADisMissions.where({
|
|
runner: 'om',
|
|
available: 'true',
|
|
done: 'false'
|
|
}).and(function (item) {
|
|
return item.next_check <= Math.floor(new Date().getTime() / 1000)
|
|
}).toArray()
|
|
})();
|
|
msis.then((result) => {
|
|
result.sort((a, b) => {
|
|
return a.next_check > b.next_check;
|
|
});
|
|
return result;
|
|
}).then((sortedResult) => {
|
|
console.table(sortedResult);
|
|
});
|
|
})(); |