🐛 fix: resolve video code issue in bulk insert

This commit is contained in:
2026-02-20 23:02:13 +07:00
parent 9bcaed9526
commit 2a8ed7c6fd
3 changed files with 5 additions and 4 deletions

View File

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

View File

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

View File

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