|
|
@@ -64,6 +64,8 @@ export class ChannelService {
|
|
|
);
|
|
|
}
|
|
|
|
|
|
+ const isDefault = (await this.mongoPrismaService.channel.count()) === 0;
|
|
|
+
|
|
|
const now = this.now();
|
|
|
|
|
|
const channel = await this.mongoPrismaService.channel.create({
|
|
|
@@ -76,6 +78,7 @@ export class ChannelService {
|
|
|
clientName: this.trimOptional(dto.clientName) ?? null,
|
|
|
clientNotice: this.trimOptional(dto.clientNotice) ?? null,
|
|
|
remark: this.trimOptional(dto.remark) ?? null,
|
|
|
+ isDefault,
|
|
|
categories: (dto.categories as any) || null,
|
|
|
tags: (dto.tags as any) || null,
|
|
|
tagNames: dto.tagNames || [],
|