Skip to content

Commit

Permalink
[fix] 빈배열 주기
Browse files Browse the repository at this point in the history
  • Loading branch information
jainefer committed Feb 17, 2024
1 parent 7dfec47 commit 6223d8e
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions src/services/video.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,24 @@ export const viewSimpleVideo=async(data)=>{

}
export const viewRecentVideo=async(data)=>{

console.log("서비스에서 전달되는 요청정보",data);
console.log("123");
const TagData=[];
const getVideoData=await getRecentVideo(data);
console.log(getVideoData[0].id);
for(let i =0; i<getVideoData.length;i++){
TagData.push(await getTag({
"videoID":getVideoData[i].id,
"version":"revision"
}));
try {
console.log("서비스에서 전달되는 요청정보",data);
console.log("123");
const TagData=[];
const getVideoData=await getRecentVideo(data);
console.log(getVideoData[0].id);
for(let i =0; i<getVideoData.length;i++){
TagData.push(await getTag({
"videoID":getVideoData[i].id,
"version":"revision"
}));
}
console.log("비디오 정보: ",getVideoData);
return getSimpleVideoResponseDTO(getVideoData,TagData);
} catch (error) {
return {"video":[]}
}
console.log("비디오 정보: ",getVideoData);
return getSimpleVideoResponseDTO(getVideoData,TagData);

}
export const viewCategoryVideo=async(data)=>{
try {
Expand Down

0 comments on commit 6223d8e

Please sign in to comment.