Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

965 B
Raw Blame
import { AppSettings } from '../../db/entities/AppSettings.entity';
import { GoogleApiUsage } from '../../db/entities/GoogleApiUsage.entity';
import { AuditModule } from '../audit/audit.module';
import { GoogleQuotaController } from './google-quota.controller';
import { GoogleQuotaService } from './google-quota.service';
import { MikroOrmModule } from '@mikro-orm/nestjs';
import { Module } from '@nestjs/common';

/**
 * The daily ceiling on Google API calls (#1582). A leaf: MapsModule and
 * TransitModule import it for the service, the admin settings use the controller.
 *
 * MikroOrmModule.forFeature([AppSettings, GoogleApiUsage]): the ceiling lives
 * in `app_settings`, the per-day count in `google_api_usage`.
 */
@Module({
  imports: [AuditModule, MikroOrmModule.forFeature([AppSettings, GoogleApiUsage])],
  controllers: [GoogleQuotaController],
  providers: [GoogleQuotaService],
  exports: [GoogleQuotaService],
})
export class GoogleQuotaModule {}