From 9caab773326881db834a81a223c26d6304457ff9 Mon Sep 17 00:00:00 2001 From: xxeol Date: Tue, 18 Jan 2022 21:40:49 +0900 Subject: [PATCH] =?UTF-8?q?style:=20=20TODO=20=EC=A3=BC=EC=84=9D=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- functions/api/routes/room/roomListGET.js | 4 ++-- functions/api/routes/room/roomRecordPOST.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/functions/api/routes/room/roomListGET.js b/functions/api/routes/room/roomListGET.js index 58aad1b..69bba32 100644 --- a/functions/api/routes/room/roomListGET.js +++ b/functions/api/routes/room/roomListGET.js @@ -34,9 +34,9 @@ module.exports = async (req, res) => { const rawRooms = await roomDB.getRoomsByUserId(client, user.userId); let waitingRooms = rawRooms.filter((rawRoom) => rawRoom.status === "NONE"); - waitingRooms = _.sortBy(waitingRooms, 'createdAt').reverse(); + waitingRooms = _.sortBy(waitingRooms, 'createdAt').reverse(); // 최근에 생선된 대기방이 위로 let ongoingRooms = rawRooms.filter((rawRoom) => rawRoom.status === "ONGOING"); - ongoingRooms = _.sortBy(ongoingRooms, 'startAt').reverse(); + ongoingRooms = _.sortBy(ongoingRooms, 'startAt').reverse(); // 최근에 시작한 습관방이 위로 console.log("waitingRooms", waitingRooms); console.log("ongoingRooms", ongoingRooms); const waitingRoomIds = [...new Set(waitingRooms.filter(Boolean).map((room) => room.roomId))]; diff --git a/functions/api/routes/room/roomRecordPOST.js b/functions/api/routes/room/roomRecordPOST.js index 8854611..ce71a35 100644 --- a/functions/api/routes/room/roomRecordPOST.js +++ b/functions/api/routes/room/roomRecordPOST.js @@ -62,6 +62,7 @@ module.exports = async (req, res) => { const uploadedRecord = await recordDB.uploadRecord(client, record.recordId, certifyingImg[0], timerRecord); if (!entry.thumbnail) { await roomDB.updateThumbnail(client, entry.entryId, certifyingImg[0]); + // @TODO 첫번째 습관 인증 축하 알림 } const data = {