Built basic blog backend.
This commit is contained in:
1 parent
75764f744d
commit
8ab9f09287
34 files changed
+221
-98
No files matched your search
Vendored
+5
-1
@@ -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);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user