mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-30 00:20:07 +00:00
refactor(addons): addon catalog and photo providers through repositories
This commit is contained in:
@@ -1,8 +1,13 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { MikroOrmModule } from '@mikro-orm/nestjs';
|
||||
import { AddonsController } from './addons.controller';
|
||||
import { AddonsService } from './addons.service';
|
||||
import { AddonGuard } from './addon.guard';
|
||||
import { AddonsMcp } from './addons.mcp';
|
||||
import { Addons } from '../../db/entities/Addons.entity';
|
||||
import { PhotoProviders } from '../../db/entities/PhotoProviders.entity';
|
||||
import { PhotoProviderFields } from '../../db/entities/PhotoProviderFields.entity';
|
||||
import { AppSettings } from '../../db/entities/AppSettings.entity';
|
||||
|
||||
/**
|
||||
* GET /api/addons — enabled add-ons + photo providers (was an inline handler in
|
||||
@@ -18,8 +23,14 @@ import { AddonsMcp } from './addons.mcp';
|
||||
* AddonsMcp puts the same listing on the MCP surface, so a model can read which
|
||||
* add-ons this instance has switched on instead of guessing from the tools it
|
||||
* was handed.
|
||||
*
|
||||
* MikroOrmModule.forFeature registers AddonsRepository/PhotoProvidersRepository/
|
||||
* PhotoProviderFieldsRepository/AppSettingsRepository for AddonsService's
|
||||
* @InjectRepository constructor (Plan 3a Task 4) — the forFeature +
|
||||
* @InjectRepository wiring pattern Task 0 set up on SettingsModule.
|
||||
*/
|
||||
@Module({
|
||||
imports: [MikroOrmModule.forFeature([Addons, PhotoProviders, PhotoProviderFields, AppSettings])],
|
||||
controllers: [AddonsController],
|
||||
providers: [AddonsService, AddonGuard, AddonsMcp],
|
||||
exports: [AddonsService, AddonGuard],
|
||||
|
||||
Reference in New Issue
Block a user