Built basic blog backend.

This commit is contained in:
2018-11-20 08:39:25 +11:00
parent 75764f744d
commit 8ab9f09287
34 changed files with 221 additions and 98 deletions

View File

@ -54,13 +54,17 @@ class CacheStore {
this.store.del(keys);
}
flush() {
this.store.flushAll();
}
//Database related stores
async getFromDatabase(key, query, params, method) {
if(typeof params === typeof undefined) params = {};
if(typeof method === typeof undefined) method = "any";
return await this.get(key, async () => {
return await this.database[method](query, params);
return await this.getDatabase()[method](query, params);
});
}
}