From 410308148d686335dfd405dcb927cff053635b73 Mon Sep 17 00:00:00 2001 From: jainefer Date: Sun, 18 Feb 2024 21:22:42 +0900 Subject: [PATCH] [feat] video --- src/dtos/video.dto.js | 5 +++-- src/services/video.service.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/dtos/video.dto.js b/src/dtos/video.dto.js index 12de517..6c4ef9a 100644 --- a/src/dtos/video.dto.js +++ b/src/dtos/video.dto.js @@ -7,7 +7,8 @@ export const getVideoResponseDTO=async (video,subHeading,summary,tag,category)=> const subHeadingData=[] const summaryData=[] const tagData=[] - + let youtubeId=video[0].link.split('embed/')[1]; + for(let i= 0; i for(let i= 0; i{ const subHeading=body.subheading; const summary = body.summary; const tag = body.tag; - let youtubeId=body.link.split('embed')[1]; + let youtubeId=body.link.split('embed/')[1]; if (youtubeId.includes('&')) { youtubeId = youtubeId.split('&')[0]; }