Browse Source

Task/move asset / cache / info / logo controllers to endpoints (#8269)

Move asset, cache, info and logo controllers to endpoints
pull/6901/merge
Thomas Kaul 2 days ago
committed by GitHub
parent
commit
0d58df7ce7
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      apps/api/src/app/activities/activities.module.ts
  2. 8
      apps/api/src/app/app.module.ts
  3. 17
      apps/api/src/app/asset/asset.module.ts
  4. 3
      apps/api/src/app/endpoints/asset-profiles/asset-profiles.module.ts
  5. 3
      apps/api/src/app/endpoints/asset-profiles/asset.controller.ts
  6. 0
      apps/api/src/app/endpoints/cache/cache.controller.ts
  7. 0
      apps/api/src/app/endpoints/cache/cache.module.ts
  8. 0
      apps/api/src/app/endpoints/info/info.controller.ts
  9. 0
      apps/api/src/app/endpoints/info/info.module.ts
  10. 0
      apps/api/src/app/endpoints/info/info.service.ts
  11. 0
      apps/api/src/app/endpoints/logo/get-logo.dto.ts
  12. 0
      apps/api/src/app/endpoints/logo/logo.controller.ts
  13. 0
      apps/api/src/app/endpoints/logo/logo.module.ts
  14. 0
      apps/api/src/app/endpoints/logo/logo.service.ts
  15. 2
      apps/api/src/app/import/import.module.ts

2
apps/api/src/app/activities/activities.module.ts

@ -1,6 +1,5 @@
import { AccountBalanceService } from '@ghostfolio/api/app/account-balance/account-balance.service'; import { AccountBalanceService } from '@ghostfolio/api/app/account-balance/account-balance.service';
import { AccountService } from '@ghostfolio/api/app/account/account.service'; import { AccountService } from '@ghostfolio/api/app/account/account.service';
import { CacheModule } from '@ghostfolio/api/app/cache/cache.module';
import { RedactValuesInResponseModule } from '@ghostfolio/api/interceptors/redact-values-in-response/redact-values-in-response.module'; import { RedactValuesInResponseModule } from '@ghostfolio/api/interceptors/redact-values-in-response/redact-values-in-response.module';
import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module'; import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module';
import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module'; import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module';
@ -29,7 +28,6 @@ import { ActivitiesService } from './activities.service';
ApiModule, ApiModule,
AssetProfileSplitModule, AssetProfileSplitModule,
BenchmarkModule, BenchmarkModule,
CacheModule,
DataGatheringQueueModule, DataGatheringQueueModule,
DataProviderModule, DataProviderModule,
ExchangeRateDataModule, ExchangeRateDataModule,

8
apps/api/src/app/app.module.ts

@ -40,17 +40,18 @@ import { AccountModule } from './account/account.module';
import { ActivitiesModule } from './activities/activities.module'; import { ActivitiesModule } from './activities/activities.module';
import { AdminModule } from './admin/admin.module'; import { AdminModule } from './admin/admin.module';
import { AppController } from './app.controller'; import { AppController } from './app.controller';
import { AssetModule } from './asset/asset.module';
import { AuthModule } from './auth/auth.module'; import { AuthModule } from './auth/auth.module';
import { CacheModule } from './cache/cache.module';
import { AiModule } from './endpoints/ai/ai.module'; import { AiModule } from './endpoints/ai/ai.module';
import { ApiKeysModule } from './endpoints/api-keys/api-keys.module'; import { ApiKeysModule } from './endpoints/api-keys/api-keys.module';
import { AssetProfilesModule } from './endpoints/asset-profiles/asset-profiles.module'; import { AssetProfilesModule } from './endpoints/asset-profiles/asset-profiles.module';
import { AssetsModule } from './endpoints/assets/assets.module'; import { AssetsModule } from './endpoints/assets/assets.module';
import { AuthDevicesModule } from './endpoints/auth-devices/auth-devices.module'; import { AuthDevicesModule } from './endpoints/auth-devices/auth-devices.module';
import { BenchmarksModule } from './endpoints/benchmarks/benchmarks.module'; import { BenchmarksModule } from './endpoints/benchmarks/benchmarks.module';
import { CacheModule } from './endpoints/cache/cache.module';
import { GhostfolioModule } from './endpoints/data-providers/ghostfolio/ghostfolio.module'; import { GhostfolioModule } from './endpoints/data-providers/ghostfolio/ghostfolio.module';
import { ExchangeRatesModule } from './endpoints/exchange-rates/exchange-rates.module'; import { ExchangeRatesModule } from './endpoints/exchange-rates/exchange-rates.module';
import { InfoModule } from './endpoints/info/info.module';
import { LogoModule } from './endpoints/logo/logo.module';
import { MarketDataModule } from './endpoints/market-data/market-data.module'; import { MarketDataModule } from './endpoints/market-data/market-data.module';
import { McpModule } from './endpoints/mcp/mcp.module'; import { McpModule } from './endpoints/mcp/mcp.module';
import { PlatformsModule } from './endpoints/platforms/platforms.module'; import { PlatformsModule } from './endpoints/platforms/platforms.module';
@ -61,8 +62,6 @@ import { WatchlistModule } from './endpoints/watchlist/watchlist.module';
import { ExportModule } from './export/export.module'; import { ExportModule } from './export/export.module';
import { HealthModule } from './health/health.module'; import { HealthModule } from './health/health.module';
import { ImportModule } from './import/import.module'; import { ImportModule } from './import/import.module';
import { InfoModule } from './info/info.module';
import { LogoModule } from './logo/logo.module';
import { PortfolioModule } from './portfolio/portfolio.module'; import { PortfolioModule } from './portfolio/portfolio.module';
import { SubscriptionModule } from './subscription/subscription.module'; import { SubscriptionModule } from './subscription/subscription.module';
import { SymbolModule } from './symbol/symbol.module'; import { SymbolModule } from './symbol/symbol.module';
@ -78,7 +77,6 @@ import { UserModule } from './user/user.module';
AiModule, AiModule,
ApiKeysModule, ApiKeysModule,
AssetProfilesModule, AssetProfilesModule,
AssetModule,
AssetsModule, AssetsModule,
AuthDevicesModule, AuthDevicesModule,
AuthModule, AuthModule,

17
apps/api/src/app/asset/asset.module.ts

@ -1,17 +0,0 @@
import { AssetProfilesModule } from '@ghostfolio/api/app/endpoints/asset-profiles/asset-profiles.module';
import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module';
import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module';
import { Module } from '@nestjs/common';
import { AssetController } from './asset.controller';
@Module({
controllers: [AssetController],
imports: [
AssetProfilesModule,
TransformDataSourceInRequestModule,
TransformDataSourceInResponseModule
]
})
export class AssetModule {}

3
apps/api/src/app/endpoints/asset-profiles/asset-profiles.module.ts

@ -15,9 +15,10 @@ import { Module } from '@nestjs/common';
import { AssetProfilesController } from './asset-profiles.controller'; import { AssetProfilesController } from './asset-profiles.controller';
import { AssetProfilesService } from './asset-profiles.service'; import { AssetProfilesService } from './asset-profiles.service';
import { AssetController } from './asset.controller';
@Module({ @Module({
controllers: [AssetProfilesController], controllers: [AssetController, AssetProfilesController],
exports: [AssetProfilesService], exports: [AssetProfilesService],
imports: [ imports: [
ActivitiesModule, ActivitiesModule,

3
apps/api/src/app/asset/asset.controller.ts → apps/api/src/app/endpoints/asset-profiles/asset.controller.ts

@ -1,4 +1,3 @@
import { AssetProfilesService } from '@ghostfolio/api/app/endpoints/asset-profiles/asset-profiles.service';
import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor'; import { TransformDataSourceInRequestInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.interceptor';
import { TransformDataSourceInResponseInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor'; import { TransformDataSourceInResponseInterceptor } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.interceptor';
import type { AssetResponse } from '@ghostfolio/common/interfaces'; import type { AssetResponse } from '@ghostfolio/common/interfaces';
@ -7,6 +6,8 @@ import { Controller, Get, Param, UseInterceptors } from '@nestjs/common';
import { DataSource } from '@prisma/client'; import { DataSource } from '@prisma/client';
import { pick } from 'lodash-es'; import { pick } from 'lodash-es';
import { AssetProfilesService } from './asset-profiles.service';
@Controller('asset') @Controller('asset')
export class AssetController { export class AssetController {
public constructor( public constructor(

0
apps/api/src/app/cache/cache.controller.ts → apps/api/src/app/endpoints/cache/cache.controller.ts

0
apps/api/src/app/cache/cache.module.ts → apps/api/src/app/endpoints/cache/cache.module.ts

0
apps/api/src/app/info/info.controller.ts → apps/api/src/app/endpoints/info/info.controller.ts

0
apps/api/src/app/info/info.module.ts → apps/api/src/app/endpoints/info/info.module.ts

0
apps/api/src/app/info/info.service.ts → apps/api/src/app/endpoints/info/info.service.ts

0
apps/api/src/app/logo/get-logo.dto.ts → apps/api/src/app/endpoints/logo/get-logo.dto.ts

0
apps/api/src/app/logo/logo.controller.ts → apps/api/src/app/endpoints/logo/logo.controller.ts

0
apps/api/src/app/logo/logo.module.ts → apps/api/src/app/endpoints/logo/logo.module.ts

0
apps/api/src/app/logo/logo.service.ts → apps/api/src/app/endpoints/logo/logo.service.ts

2
apps/api/src/app/import/import.module.ts

@ -1,6 +1,5 @@
import { AccountModule } from '@ghostfolio/api/app/account/account.module'; import { AccountModule } from '@ghostfolio/api/app/account/account.module';
import { ActivitiesModule } from '@ghostfolio/api/app/activities/activities.module'; import { ActivitiesModule } from '@ghostfolio/api/app/activities/activities.module';
import { CacheModule } from '@ghostfolio/api/app/cache/cache.module';
import { PortfolioModule } from '@ghostfolio/api/app/portfolio/portfolio.module'; import { PortfolioModule } from '@ghostfolio/api/app/portfolio/portfolio.module';
import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module'; import { TransformDataSourceInRequestModule } from '@ghostfolio/api/interceptors/transform-data-source-in-request/transform-data-source-in-request.module';
import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module'; import { TransformDataSourceInResponseModule } from '@ghostfolio/api/interceptors/transform-data-source-in-response/transform-data-source-in-response.module';
@ -28,7 +27,6 @@ import { ImportService } from './import.service';
AccountModule, AccountModule,
ActivitiesModule, ActivitiesModule,
ApiModule, ApiModule,
CacheModule,
ConfigurationModule, ConfigurationModule,
DataGatheringQueueModule, DataGatheringQueueModule,
DataProviderModule, DataProviderModule,

Loading…
Cancel
Save