From 435803f9e0866dbf7935e6be56befe940ad586e7 Mon Sep 17 00:00:00 2001 From: izone00 Date: Fri, 5 Apr 2024 18:56:19 +0900 Subject: [PATCH] =?UTF-8?q?[Bug]=20test-deploy=20=EB=B9=8C=EB=93=9C=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=201.=20PartyRoomEditMod?= =?UTF-8?q?al=20import=20=EA=B2=BD=EB=A1=9C=20=EC=88=98=EC=A0=95=202.=20pa?= =?UTF-8?q?rtyDetail=20mocking=20=EC=A0=9C=EA=B1=B0=203.=20partyComment=20?= =?UTF-8?q?isExist=20=EC=98=A4=ED=83=80=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/modalType/AdminModal.tsx | 2 +- .../pingpong/party/rooms/[roomId]/index.ts | 82 ------------------- types/partyTypes.ts | 2 +- 3 files changed, 2 insertions(+), 84 deletions(-) delete mode 100644 pages/api/pingpong/party/rooms/[roomId]/index.ts diff --git a/components/modal/modalType/AdminModal.tsx b/components/modal/modalType/AdminModal.tsx index 0e02677de..3eb35f689 100644 --- a/components/modal/modalType/AdminModal.tsx +++ b/components/modal/modalType/AdminModal.tsx @@ -20,7 +20,7 @@ import AdminUserCoinModal from 'components/modal/admin/AdminUserCoinModal'; import DeletePenaltyModal from 'components/modal/admin/DeletePenaltyModal'; import DetailModal from 'components/modal/admin/DetailModal'; import AdminSeasonEdit from 'components/modal/admin/SeasonEdit'; -import PartyRoomEditModal from '../party/PartyRoomEditModal'; +import PartyRoomEditModal from 'components/modal/party/PartyRoomEditModal'; export default function AdminModal() { const { diff --git a/pages/api/pingpong/party/rooms/[roomId]/index.ts b/pages/api/pingpong/party/rooms/[roomId]/index.ts deleted file mode 100644 index f2c39caad..000000000 --- a/pages/api/pingpong/party/rooms/[roomId]/index.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { PartyRoomDetail, PartyRoomStatus } from 'types/partyTypes'; -import type { NextApiRequest, NextApiResponse } from 'next'; - -export default function handler( - _req: NextApiRequest, - res: NextApiResponse -) { - const templetes: PartyRoomDetail[] = []; - const status: PartyRoomStatus[] = ['HIDDEN', 'OPEN', 'START', 'FINISH']; - - for (let i = 1; i < 11; i++) { - const date = new Date().toString(); - const create = i; - - templetes.push({ - roomId: i, - title: '파티룸 ' + i, - categoryId: 1, - currentPeople: 3, - minPeople: 3, - maxPeople: 5, - dueDate: date, - createDate: date, - myNickname: create === 1 ? 'host' : 'guest' + create, - hostNickname: 'host', - content: 'content is good', - status: status[i % 4], - roomUsers: [ - { - roomUserId: 1, - userRoomId: 1, - nickname: 'host', - intraId: 'juha', - userImage: `https://avatars.githubusercontent.com/u/68673565?v=4`, - }, - { - roomUserId: 2, - userRoomId: 2, - nickname: 'guest1', - intraId: 'wojeong', - userImage: null, - }, - { - roomUserId: 3, - userRoomId: 3, - nickname: 'guest2', - intraId: 'jeywon', - userImage: null, - }, - ], - comments: [ - { - commentId: 1, - nickname: 'host', - content: 'host comment달았어요', - isHidden: false, - createDate: new Date().toString(), - }, - { - commentId: 2, - nickname: 'guest1', - content: 'guest1 comment달았어요', - isHidden: true, - createDate: new Date(), - }, - { - commentId: 3, - nickname: 'hello world', - content: 'hello world comment달았어요', - isHidden: false, - createDate: new Date(), - }, - ], - }); - } - - const detail = templetes.find( - (data) => _req.query.roomId === data.roomId.toString() - ); - - res.status(200).json(detail); -} diff --git a/types/partyTypes.ts b/types/partyTypes.ts index 507e82e9d..5ff6e8a6f 100644 --- a/types/partyTypes.ts +++ b/types/partyTypes.ts @@ -41,7 +41,7 @@ export type PartyComment = { commentId: number; nickname: string; intraId: string | null; - isexist: boolean; + isExist: boolean; content: string; isHidden: boolean; createDate: string;