|
|
@@ -6,6 +6,7 @@ import { RabbitmqPublisherService } from '../../rabbitmq/rabbitmq-publisher.serv
|
|
|
import { PrismaMongoStatsService } from '../../prisma/prisma-mongo-stats.service';
|
|
|
import { PrismaMongoService } from '../../prisma/prisma-mongo.service';
|
|
|
import { AdService } from '../ads/ad.service';
|
|
|
+import { SysParamsService } from '../sys-params/sys-params.service';
|
|
|
|
|
|
type LoginParams = {
|
|
|
uid: string;
|
|
|
@@ -21,8 +22,7 @@ type LoginResult = {
|
|
|
uid: string;
|
|
|
channelId: string;
|
|
|
startupAds: any | null; // keep as any until you wire your Ad payload DTO
|
|
|
- cdn_img: string;
|
|
|
- cdn_video: string;
|
|
|
+ conf: any | null;
|
|
|
};
|
|
|
|
|
|
@Injectable()
|
|
|
@@ -34,6 +34,7 @@ export class AuthService {
|
|
|
private readonly prismaMongoStatsService: PrismaMongoStatsService,
|
|
|
private readonly prismaMongoService: PrismaMongoService, // box-admin
|
|
|
private readonly adService: AdService,
|
|
|
+ private readonly sysParamsService: SysParamsService,
|
|
|
) {}
|
|
|
|
|
|
async login(params: LoginParams): Promise<LoginResult> {
|
|
|
@@ -105,13 +106,13 @@ export class AuthService {
|
|
|
// 5) startupAds (placeholder: you’ll wire channel-specific ads later)
|
|
|
// For now return null to keep behaviour deterministic.
|
|
|
const startupAds = await this.adService.listAdsByType(1, 20);
|
|
|
+ const conf = await this.sysParamsService.getSysCnf();
|
|
|
|
|
|
return {
|
|
|
uid,
|
|
|
channelId: finalChannelId,
|
|
|
startupAds,
|
|
|
- cdn_img: "https://vm.rvakc.xyz/res/decode/",
|
|
|
- cdn_video: "https://vm.rvakc.xyz/api/web/media/m3u8/"
|
|
|
+ conf,
|
|
|
|
|
|
};
|
|
|
}
|