|
|
@@ -21,6 +21,7 @@ type LoginParams = {
|
|
|
type LoginResult = {
|
|
|
uid: string;
|
|
|
channelId: string;
|
|
|
+ channel: any;
|
|
|
startupAds: any | null; // keep as any until you wire your Ad payload DTO
|
|
|
conf: any | null;
|
|
|
};
|
|
|
@@ -111,6 +112,7 @@ export class AuthService {
|
|
|
return {
|
|
|
uid,
|
|
|
channelId: finalChannelId,
|
|
|
+ channel: await this.getChannleInfo(finalChannelId),
|
|
|
startupAds,
|
|
|
conf,
|
|
|
};
|
|
|
@@ -180,6 +182,22 @@ export class AuthService {
|
|
|
// Channel resolution (box-admin)
|
|
|
// ---------------------------
|
|
|
|
|
|
+ // get channel info and return channelId, landingUrl, videoCdn, coverCdn, clientName, clientNotice
|
|
|
+ private async getChannleInfo(channelId: string): Promise<any> {
|
|
|
+ const channel = await this.prismaMongoService.channel.findUnique({
|
|
|
+ where: { channelId },
|
|
|
+ select: {
|
|
|
+ channelId: true,
|
|
|
+ landingUrl: true,
|
|
|
+ videoCdn: true,
|
|
|
+ coverCdn: true,
|
|
|
+ clientName: true,
|
|
|
+ clientNotice: true,
|
|
|
+ },
|
|
|
+ });
|
|
|
+ return channel;
|
|
|
+ }
|
|
|
+
|
|
|
private async resolveFirstLoginChannel(
|
|
|
channelIdInput?: string,
|
|
|
): Promise<any> {
|