Moved sponsors cache creation until after diskcache is done.

refs #315
This commit is contained in:
softsimon
2021-01-30 22:12:22 +07:00
parent 6a9c4d82ec
commit f3c18b152a
2 changed files with 8 additions and 9 deletions

View File

@@ -16,14 +16,9 @@ class Donations {
sponsorsCache: any[] = [];
constructor() {
if (!config.SPONSORS.ENABLED) {
return;
}
this.$updateCache();
}
constructor() {}
async $updateCache() {
public async $updateCache() {
try {
this.sponsorsCache = await this.$getDonationsFromDatabase('handle, image');
} catch (e) {