From d7c15ad02b0007ac1aab284684e537f5346eeb32 Mon Sep 17 00:00:00 2001 From: Juuunyeok Date: Mon, 19 Feb 2024 19:23:27 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20=EC=A0=84=ED=99=94=EB=B2=88?= =?UTF-8?q?=ED=98=B8=20=EC=A4=91=EB=B3=B5=20=EC=9D=BC=EC=8B=9C=20=ED=95=B4?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/sms.controller.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/controllers/sms.controller.js b/src/controllers/sms.controller.js index 0fb9bf0..2a981a6 100644 --- a/src/controllers/sms.controller.js +++ b/src/controllers/sms.controller.js @@ -7,14 +7,14 @@ export const sendVerificationCode= async (req, res)=>{ let codecheck; try { const { phone_number } = req.body; - const checkPhone = await findPhoneNumber(phone_number); - if (checkPhone) { - return res.status(400).json({ - success: false, - code: 'DUPLICATE_PHONE_NUMBER', - message: '중복된 전화번호입니다.', - }); - } + // const checkPhone = await findPhoneNumber(phone_number); + // if (checkPhone) { + // return res.status(400).json({ + // success: false, + // code: 'DUPLICATE_PHONE_NUMBER', + // message: '중복된 전화번호입니다.', + // }); + // } const messageService = new SolapiMessageService(process.env.SMS_KEY, process.env.SMS_SECRET); // 인증코드 생성 From 2cabe246e444cc43c8bc8754ce4c295fb655f201 Mon Sep 17 00:00:00 2001 From: Juuunyeok Date: Mon, 19 Feb 2024 19:28:47 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=20unreadDummy=20=EB=B9=88=EB=B0=B0?= =?UTF-8?q?=EC=97=B4=20=EB=A6=AC=ED=84=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/sms.controller.js | 16 ++++++++-------- src/services/video.service.js | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/controllers/sms.controller.js b/src/controllers/sms.controller.js index 2a981a6..0fb9bf0 100644 --- a/src/controllers/sms.controller.js +++ b/src/controllers/sms.controller.js @@ -7,14 +7,14 @@ export const sendVerificationCode= async (req, res)=>{ let codecheck; try { const { phone_number } = req.body; - // const checkPhone = await findPhoneNumber(phone_number); - // if (checkPhone) { - // return res.status(400).json({ - // success: false, - // code: 'DUPLICATE_PHONE_NUMBER', - // message: '중복된 전화번호입니다.', - // }); - // } + const checkPhone = await findPhoneNumber(phone_number); + if (checkPhone) { + return res.status(400).json({ + success: false, + code: 'DUPLICATE_PHONE_NUMBER', + message: '중복된 전화번호입니다.', + }); + } const messageService = new SolapiMessageService(process.env.SMS_KEY, process.env.SMS_SECRET); // 인증코드 생성 diff --git a/src/services/video.service.js b/src/services/video.service.js index 4b6eefc..67d067e 100644 --- a/src/services/video.service.js +++ b/src/services/video.service.js @@ -226,7 +226,9 @@ export const viewUnReadDummyVideo=async(data)=>{ console.log("123"); const TagData=[]; const getVideoData=await UnReadVideoInfo(data); - + if (!(getVideoData && Array.isArray(getVideoData) && getVideoData.length >0)) { + return {"videos":[]}; + } for(let i =0; i