|
@@ -332,8 +332,6 @@ export class VideoMediaService {
|
|
|
where: { id: dto.id },
|
|
where: { id: dto.id },
|
|
|
select: {
|
|
select: {
|
|
|
id: true,
|
|
id: true,
|
|
|
- secondTags: true,
|
|
|
|
|
- tags: true,
|
|
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -349,16 +347,11 @@ export class VideoMediaService {
|
|
|
);
|
|
);
|
|
|
const mgntTagNames = mgntVTags.map((t) => t.tagName);
|
|
const mgntTagNames = mgntVTags.map((t) => t.tagName);
|
|
|
|
|
|
|
|
- const original = video.tags ?? [];
|
|
|
|
|
- const mergedSecondTags = Array.from(
|
|
|
|
|
- new Set([...original, ...mgntTagNames]),
|
|
|
|
|
- );
|
|
|
|
|
-
|
|
|
|
|
await this.prisma.videoMedia.update({
|
|
await this.prisma.videoMedia.update({
|
|
|
where: { id: dto.id },
|
|
where: { id: dto.id },
|
|
|
data: {
|
|
data: {
|
|
|
vTags: { set: mgntVTags },
|
|
vTags: { set: mgntVTags },
|
|
|
- tags: { set: mergedSecondTags },
|
|
|
|
|
|
|
+ tags: { set: mgntTagNames },
|
|
|
editedAt: BigInt(Math.floor(Date.now() / 1000)),
|
|
editedAt: BigInt(Math.floor(Date.now() / 1000)),
|
|
|
updatedAt: new Date(),
|
|
updatedAt: new Date(),
|
|
|
},
|
|
},
|