|
@@ -4,6 +4,7 @@ import { UserLoginEventPayload } from '@box/common/events/user-login-event.dto';
|
|
|
import { RabbitmqPublisherService } from '../../rabbitmq/rabbitmq-publisher.service';
|
|
import { RabbitmqPublisherService } from '../../rabbitmq/rabbitmq-publisher.service';
|
|
|
import { PrismaMongoStatsService } from '../../prisma/prisma-mongo-stats.service';
|
|
import { PrismaMongoStatsService } from '../../prisma/prisma-mongo-stats.service';
|
|
|
import { PrismaMongoService } from '../../prisma/prisma-mongo.service';
|
|
import { PrismaMongoService } from '../../prisma/prisma-mongo.service';
|
|
|
|
|
+import { AdService } from '../ads/ad.service';
|
|
|
|
|
|
|
|
type LoginParams = {
|
|
type LoginParams = {
|
|
|
uid: string;
|
|
uid: string;
|
|
@@ -29,6 +30,7 @@ export class AuthService {
|
|
|
private readonly rabbitmqPublisher: RabbitmqPublisherService,
|
|
private readonly rabbitmqPublisher: RabbitmqPublisherService,
|
|
|
private readonly prismaMongoStatsService: PrismaMongoStatsService,
|
|
private readonly prismaMongoStatsService: PrismaMongoStatsService,
|
|
|
private readonly prismaMongoService: PrismaMongoService, // box-admin
|
|
private readonly prismaMongoService: PrismaMongoService, // box-admin
|
|
|
|
|
+ private readonly adService: AdService,
|
|
|
) {}
|
|
) {}
|
|
|
|
|
|
|
|
async login(params: LoginParams): Promise<LoginResult> {
|
|
async login(params: LoginParams): Promise<LoginResult> {
|
|
@@ -98,7 +100,7 @@ export class AuthService {
|
|
|
|
|
|
|
|
// 5) startupAds (placeholder: you’ll wire channel-specific ads later)
|
|
// 5) startupAds (placeholder: you’ll wire channel-specific ads later)
|
|
|
// For now return null to keep behaviour deterministic.
|
|
// For now return null to keep behaviour deterministic.
|
|
|
- const startupAds: any | null = null;
|
|
|
|
|
|
|
+ const startupAds = await this.adService.listAdsByType(1, 20);
|
|
|
|
|
|
|
|
return {
|
|
return {
|
|
|
uid,
|
|
uid,
|