feat: first add
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
import {
|
||||
getDb,
|
||||
getResourceDb,
|
||||
getBackupDb,
|
||||
getLogDb
|
||||
} from "./dbServer.mjs";
|
||||
|
||||
export default class DBHelper {
|
||||
static baseDB = null;
|
||||
static resourceDB = null;
|
||||
static backupDB = null;
|
||||
static logDB = null;
|
||||
|
||||
static async init() {
|
||||
this.baseDB = await getDb();
|
||||
this.resourceDB = await getResourceDb();
|
||||
this.backupDB = await getBackupDb();
|
||||
this.logDB = await getLogDb();
|
||||
}
|
||||
|
||||
static getBackupDb() {
|
||||
// return getBackupDb();
|
||||
return this.backupDB;
|
||||
}
|
||||
|
||||
static getLogDb() {
|
||||
// return getLogDb();
|
||||
return this.logDB;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user