mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-26 20:07:33 -07:00
Clean up
This commit is contained in:
parent
9080142951
commit
4b216cd192
1 changed files with 0 additions and 13 deletions
|
@ -66,19 +66,6 @@ export default abstract class Chart<T> {
|
||||||
} else {
|
} else {
|
||||||
this.collection.createIndex({ span: -1, date: -1 }, { unique: true });
|
this.collection.createIndex({ span: -1, date: -1 }, { unique: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
//#region 後方互換性のため
|
|
||||||
this.collection.find({ span: 'day' }, { fields: { _id: true, date: true } }).then(logs => {
|
|
||||||
logs.forEach(log => {
|
|
||||||
this.collection.update({ _id: log._id }, { $set: { date: utc(log.date).hour(0).toDate() } });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.collection.find({ span: 'hour' }, { fields: { _id: true, date: true } }).then(logs => {
|
|
||||||
logs.forEach(log => {
|
|
||||||
this.collection.update({ _id: log._id }, { $set: { date: utc(log.date).toDate() } });
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@autobind
|
@autobind
|
||||||
|
|
Loading…
Reference in a new issue