feat(M03-B): 完成装修广告与媒体管理
This commit is contained in:
@@ -7,6 +7,9 @@ import { RbacRepository } from './auth/rbac-repository.js';
|
||||
import { parseWechatAppSecrets, WechatHttpClient } from './auth/wechat-client.js';
|
||||
import { UserManagementRepository } from './auth/user-management-repository.js';
|
||||
import { StoreRoomRepository } from './stores/store-room-repository.js';
|
||||
import { ContentRepository } from './content/content-repository.js';
|
||||
import { MediaStorage } from './content/media-storage.js';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
const config = loadConfig();
|
||||
const pool = createMySqlPool(config);
|
||||
@@ -34,6 +37,13 @@ const app = await buildApp({
|
||||
authRepository,
|
||||
accessControl,
|
||||
jwtSecret: config.auth.jwtSecret
|
||||
},
|
||||
content: {
|
||||
repository: new ContentRepository(pool),
|
||||
mediaStorage: new MediaStorage(resolve(process.cwd(), 'shared', 'uploads')),
|
||||
authRepository,
|
||||
accessControl,
|
||||
jwtSecret: config.auth.jwtSecret
|
||||
}
|
||||
});
|
||||
app.addHook('onClose', async () => {
|
||||
|
||||
Reference in New Issue
Block a user