53e0db6a98
Add log_promo_event for scan/attribution/register/order with IP; admin metrics APIs and ECharts on promo detail page. Co-authored-by: Cursor <cursoragent@cursor.com>
25 lines
973 B
TypeScript
25 lines
973 B
TypeScript
import { Module } from '@nestjs/common';
|
|
import { JwtModule } from '@nestjs/jwt';
|
|
import { GeoModule } from '../../common/geo/geo.module';
|
|
import { IntegrationsModule } from '../../integrations/integrations.module';
|
|
import { JwtAuthGuard } from '../../common/guards/jwt-auth.guard';
|
|
import { HqAuthGuard } from '../../common/guards/hq-auth.guard';
|
|
import { AdminPromoCodeController } from './admin-promo-code.controller';
|
|
import { PromoCodeService } from './promo-code.service';
|
|
import { PromoMetricLogService } from './promo-metric-log.service';
|
|
|
|
@Module({
|
|
imports: [
|
|
GeoModule,
|
|
IntegrationsModule,
|
|
JwtModule.register({
|
|
secret: process.env.JWT_SECRET || 'dukang-prev1-dev-secret',
|
|
signOptions: { expiresIn: process.env.JWT_EXPIRES_IN || '7d' },
|
|
}),
|
|
],
|
|
controllers: [AdminPromoCodeController],
|
|
providers: [PromoCodeService, PromoMetricLogService, JwtAuthGuard, HqAuthGuard],
|
|
exports: [PromoCodeService],
|
|
})
|
|
export class PromoModule {}
|