generated from tailored/router-db-template
temp
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { XhsClient } from '@kevisual/xhs/libs/xhs.ts';
|
||||
import { Sequelize } from 'sequelize';
|
||||
import { createSequelize } from '@kevisual/xhs/services/xhs-db/db.ts';
|
||||
// import { createSequelize } from '@kevisual/xhs/services/xhs-db/db.ts';
|
||||
import path from 'node:path';
|
||||
import fs from 'node:fs';
|
||||
|
||||
@@ -17,7 +17,7 @@ type XhsClientMap = {
|
||||
client: XhsClient;
|
||||
key: string;
|
||||
options: XhsClientOptions;
|
||||
db: Sequelize;
|
||||
db?: Sequelize;
|
||||
};
|
||||
type XhsServicesOptions = {
|
||||
root?: string;
|
||||
@@ -49,16 +49,16 @@ export class XhsServices {
|
||||
if (!fs.existsSync(storage) || !isNew) {
|
||||
isNew = true;
|
||||
}
|
||||
const db = createSequelize({ storage: storage });
|
||||
// const db = createSequelize({ storage: storage });
|
||||
const xhsClientMap = {
|
||||
client,
|
||||
key,
|
||||
options,
|
||||
db,
|
||||
// db,
|
||||
};
|
||||
if (isNew) {
|
||||
this.initDb(xhsClientMap);
|
||||
}
|
||||
// if (isNew) {
|
||||
// this.initDb(xhsClientMap);
|
||||
// }
|
||||
this.map.set(key, xhsClientMap);
|
||||
|
||||
return client;
|
||||
|
||||
Reference in New Issue
Block a user