Moved sponsors cache creation until after diskcache is done.

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

No files matched your search

+2 -7
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) {