fix/thumbnail-code #20

Merged
vivy-agent merged 10 commits from fix/thumbnail-code into main 2026-02-22 11:10:08 +07:00
9 changed files with 266 additions and 151 deletions
Showing only changes of commit 2a8ed7c6fd - Show all commits

View File

@ -9,7 +9,8 @@ export interface BulkInsertVideoBodyRequest {
episode: number; episode: number;
videos: Array<{ videos: Array<{
service_id: string; service_id: string;
code: string; videoCode: string;
thumbnailCode?: string;
}>; }>;
}>; }>;
} }

View File

@ -9,9 +9,9 @@ export const bulkInsertVideoRepository = async (
try { try {
return await prisma.video.upsert({ return await prisma.video.upsert({
where: { where: {
serviceId_code: { serviceId_videoCode: {
serviceId: payload.serviceId, serviceId: payload.serviceId,
code: payload.code, videoCode: payload.videoCode,
}, },
}, },
create: { create: {

View File

@ -20,7 +20,7 @@ export const bulkInsertVideoService = async (
pendingUpload: false, pendingUpload: false,
episodeId: episodeId.id, episodeId: episodeId.id,
serviceId: videoData.service_id, serviceId: videoData.service_id,
code: videoData.code, videoCode: videoData.videoCode,
uploadedBy: SystemAccountId, uploadedBy: SystemAccountId,
}); });