Compare commits

...

2 Commits

4 changed files with 7 additions and 4 deletions

View File

@ -175,6 +175,7 @@ Table videos {
service video_services [not null]
serviceId String [not null]
videoCode String [not null]
thumbnailCode String
pendingUpload Boolean [not null, default: true]
uploader users [not null]
uploadedBy String [not null]

View File

@ -9,7 +9,8 @@ export interface BulkInsertVideoBodyRequest {
episode: number;
videos: Array<{
service_id: string;
code: string;
video_code: string;
thumbnail_code?: 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,8 @@ export const bulkInsertVideoService = async (
pendingUpload: false,
episodeId: episodeId.id,
serviceId: videoData.service_id,
code: videoData.code,
videoCode: videoData.video_code,
thumbnailCode: videoData.thumbnail_code,
uploadedBy: SystemAccountId,
});