diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 648dd9520..1968888a1 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -1,8 +1,8 @@ name: backend test on: - push: - pull_request: [develop, main] + pull_request: + branches: [develop, main] paths: - apps/backend/** diff --git a/README.md b/README.md index 167863de2..389f6a542 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,13 @@ ## πŸ›  기술 μŠ€νƒ -| μ˜μ—­ | 기술 μŠ€νƒ | -| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| **곡톡** | ![TypeScript](https://img.shields.io/badge/TypeScript-5.6.3-3178C6?style=flat-square&logo=typescript&logoColor=white) ![WebSocket](https://img.shields.io/badge/WebSocket-8.18.0-010101?style=flat-square&logo=socket.io&logoColor=white) ![TSDoc](https://img.shields.io/badge/TSDoc-0.26.11-3178C6?style=flat-square&logo=typescript&logoColor=white) | -| **Frontend** | ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white) ![Vite](https://img.shields.io/badge/Vite-5.4.10-646CFF?style=flat-square&logo=vite&logoColor=white) ![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-3.4-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white) ![shadcn/ui](https://img.shields.io/badge/shadcn%2Fui-latest-000000?style=flat-square) ![Vitest](https://img.shields.io/badge/Vitest-latest-6E9F18?style=flat-square&logo=vitest&logoColor=white) ![Testing Library](https://img.shields.io/badge/Testing%20Library-latest-E33332?style=flat-square&logo=testing-library&logoColor=white) ![Storybook](https://img.shields.io/badge/Storybook-8.4.2-FF4785?style=flat-square&logo=storybook&logoColor=white) | -| **Backend** | ![NestJS](https://img.shields.io/badge/NestJS-10.4.7-E0234E?style=flat-square&logo=nestjs&logoColor=white) ![MySQL](https://img.shields.io/badge/MySQL-2-4479A1?style=flat-square&logo=mysql&logoColor=white) ![SQLite](https://img.shields.io/badge/SQLite-3-003B57?style=flat-square&logo=sqlite&logoColor=white) ![TypeORM](https://img.shields.io/badge/TypeORM-0.3.20-E93524?style=flat-square&logo=typeorm&logoColor=white) ![Swagger](https://img.shields.io/badge/Swagger-8.0.5-85EA2D?style=flat-square&logo=swagger&logoColor=black) ![Jest](https://img.shields.io/badge/Jest-Testing-C21325?style=flat-square&logo=jest&logoColor=white) ![SuperTest](https://img.shields.io/badge/SuperTest-Testing-009688?style=flat-square&logo=testing-library&logoColor=white) ![Artillery](https://img.shields.io/badge/Artillery-2.0.21-CA2B2B?style=flat-square&logoColor=white) | -| **인프라** | ![NCP](https://img.shields.io/badge/Naver%20Cloud%20Platform-latest-03C75A?style=flat-square&logo=naver&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-1.24.0-009639?style=flat-square&logo=nginx&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-3.0-2088FF?style=flat-square&logo=github-actions&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-24.0.7-2496ED?style=flat-square&logo=docker&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-Ubuntu%2022.04-FCC624?style=flat-square&logo=linux&logoColor=black) | -| **ν˜‘μ—… 도ꡬ** | ![Notion](https://img.shields.io/badge/Notion-2.0.41-000000?style=flat-square&logo=notion&logoColor=white) ![Figma](https://img.shields.io/badge/Figma-latest-F24E1E?style=flat-square&logo=figma&logoColor=white) ![Excalidraw](https://img.shields.io/badge/Excalidraw-latest-6965DB?style=flat-square&logo=excalidraw&logoColor=white) ![Zoom](https://img.shields.io/badge/Zoom-5.17.0-2D8CFF?style=flat-square&logo=zoom&logoColor=white) ![Git](https://img.shields.io/badge/Git-2.42.0-F05032?style=flat-square&logo=git&logoColor=white) ![GitHub](https://img.shields.io/badge/GitHub-latest-181717?style=flat-square&logo=github&logoColor=white) ![GitHub Projects](https://img.shields.io/badge/GitHub%20Projects-latest-181717?style=flat-square&logo=github&logoColor=white) | +| μ˜μ—­ | 기술 μŠ€νƒ | +| ------------- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| **곡톡** | ![TypeScript](https://img.shields.io/badge/TypeScript-5.6.3-3178C6?style=flat-square&logo=typescript&logoColor=white) ![WebSocket](https://img.shields.io/badge/WebSocket-8.18.0-010101?style=flat-square&logo=socket.io&logoColor=white) ![TSDoc](https://img.shields.io/badge/TSDoc-0.26.11-3178C6?style=flat-square&logo=typescript&logoColor=white) | +| **Frontend** | ![React](https://img.shields.io/badge/React-18.3.1-61DAFB?style=flat-square&logo=react&logoColor=white) ![Vite](https://img.shields.io/badge/Vite-5.4.10-646CFF?style=flat-square&logo=vite&logoColor=white) ![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-3.4-38B2AC?style=flat-square&logo=tailwind-css&logoColor=white) ![shadcn/ui](https://img.shields.io/badge/shadcn%2Fui-latest-000000?style=flat-square) ![Vitest](https://img.shields.io/badge/Vitest-latest-6E9F18?style=flat-square&logo=vitest&logoColor=white) ![Testing Library](https://img.shields.io/badge/Testing%20Library-latest-E33332?style=flat-square&logo=testing-library&logoColor=white) ![Storybook](https://img.shields.io/badge/Storybook-8.4.2-FF4785?style=flat-square&logo=storybook&logoColor=white) | +| **Backend** | ![NestJS](https://img.shields.io/badge/NestJS-10.4.7-E0234E?style=flat-square&logo=nestjs&logoColor=white) ![MySQL](https://img.shields.io/badge/MySQL-2-4479A1?style=flat-square&logo=mysql&logoColor=white) ![SQLite](https://img.shields.io/badge/SQLite-3-003B57?style=flat-square&logo=sqlite&logoColor=white) ![TypeORM](https://img.shields.io/badge/TypeORM-0.3.20-E93524?style=flat-square&logo=typeorm&logoColor=white) ![Swagger](https://img.shields.io/badge/Swagger-8.0.5-85EA2D?style=flat-square&logo=swagger&logoColor=black) ![Jest](https://img.shields.io/badge/Jest-Testing-C21325?style=flat-square&logo=jest&logoColor=white) ![SuperTest](https://img.shields.io/badge/SuperTest-Testing-009688?style=flat-square&logo=testing-library&logoColor=white) | +| **인프라** | ![NCP](https://img.shields.io/badge/Naver%20Cloud%20Platform-latest-03C75A?style=flat-square&logo=naver&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-1.24.0-009639?style=flat-square&logo=nginx&logoColor=white) ![GitHub Actions](https://img.shields.io/badge/GitHub%20Actions-3.0-2088FF?style=flat-square&logo=github-actions&logoColor=white) ![Docker](https://img.shields.io/badge/Docker-24.0.7-2496ED?style=flat-square&logo=docker&logoColor=white) ![Linux](https://img.shields.io/badge/Linux-Ubuntu%2022.04-FCC624?style=flat-square&logo=linux&logoColor=black) ![Grafana](https://img.shields.io/badge/Grafana-10.2.3-F46800?style=flat-square&logo=grafana&logoColor=white) ![Prometheus](https://img.shields.io/badge/Prometheus-2.43.0-E6522C?style=flat-square&logo=prometheus&logoColor=white) ![k6](https://img.shields.io/badge/k6-0.55.0-7D64FF?style=flat-square&logo=k6&logoColor=white)| +| **ν˜‘μ—… 도ꡬ** | ![Notion](https://img.shields.io/badge/Notion-2.0.41-000000?style=flat-square&logo=notion&logoColor=white) ![Figma](https://img.shields.io/badge/Figma-latest-F24E1E?style=flat-square&logo=figma&logoColor=white) ![Excalidraw](https://img.shields.io/badge/Excalidraw-latest-6965DB?style=flat-square&logo=excalidraw&logoColor=white) ![Zoom](https://img.shields.io/badge/Zoom-5.17.0-2D8CFF?style=flat-square&logo=zoom&logoColor=white) ![Git](https://img.shields.io/badge/Git-2.42.0-F05032?style=flat-square&logo=git&logoColor=white) ![GitHub](https://img.shields.io/badge/GitHub-latest-181717?style=flat-square&logo=github&logoColor=white) ![GitHub Projects](https://img.shields.io/badge/GitHub%20Projects-latest-181717?style=flat-square&logo=github&logoColor=white) | ## πŸ— μ‹œμŠ€ν…œ μ•„ν‚€ν…μ²˜ @@ -456,7 +456,7 @@ pnpm run start └── ... ``` -## νŒ€ μ†Œκ°œ(ν‘œμΈλ° μ–˜λŠ” μˆ˜μ •ν•˜μ§€ λ§μ•„μ£Όμ„Έμš”) +## νŒ€ μ†Œκ°œ | [J004 κ°•μ€€ν˜„](https://github.com/JunhyunKang) | [J074 κΉ€ν˜„μš°](https://github.com/krokerdile) | [J086 λ„μ„ λΉˆ](https://github.com/typingmistake) | [J175 μ΄λ™ν˜„](https://github.com/codemario318) | [J217 μ „ν˜„λ―Ό](https://github.com/joyjhm) | | --------------------------------------------------------- | --------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | --------------------------------------------------------- | diff --git a/apps/backend/src/quiz-zone/dto/create-quiz-zone.dto.ts b/apps/backend/src/quiz-zone/dto/create-quiz-zone.dto.ts index 008433d71..bb257971a 100644 --- a/apps/backend/src/quiz-zone/dto/create-quiz-zone.dto.ts +++ b/apps/backend/src/quiz-zone/dto/create-quiz-zone.dto.ts @@ -24,7 +24,7 @@ export class CreateQuizZoneDto { @IsInt({ message: 'μ΅œλŒ€ ν”Œλ ˆμ΄μ–΄ μˆ˜κ°€ μ—†μŠ΅λ‹ˆλ‹€.' }) @Min(1, { message: 'μ΅œμ†Œ 1λͺ… 이상이어야 ν•©λ‹ˆλ‹€.' }) - // @Max(300, { message: 'μ΅œλŒ€ 300λͺ…κΉŒμ§€ κ°€λŠ₯ν•©λ‹ˆλ‹€.' }) + @Max(300, { message: 'μ΅œλŒ€ 300λͺ…κΉŒμ§€ κ°€λŠ₯ν•©λ‹ˆλ‹€.' }) readonly limitPlayerCount: number; @IsNotEmpty({ message: 'ν€΄μ¦ˆμ‘΄μ„ μ„ νƒν•΄μ£Όμ„Έμš”.' }) diff --git a/apps/backend/src/quiz-zone/quiz-zone.service.spec.ts b/apps/backend/src/quiz-zone/quiz-zone.service.spec.ts index 847367989..b6a8e13de 100644 --- a/apps/backend/src/quiz-zone/quiz-zone.service.spec.ts +++ b/apps/backend/src/quiz-zone/quiz-zone.service.spec.ts @@ -602,7 +602,7 @@ describe('QuizZoneService', () => { {id: "player1", nickname: "λ―ΈμΉœνˆ¬μ‚¬", score: 0, ranking: 1}, {id: "player2", nickname: "λ―ΈμΉœνˆ¬μ‚¬", score: 0, ranking: 1} ], - endSocketTime: Date.now(), + endSocketTime: expect.any(Number), }); }); diff --git a/apps/frontend/src/blocks/CreateQuizZone/CreateQuizZoneBasic.tsx b/apps/frontend/src/blocks/CreateQuizZone/CreateQuizZoneBasic.tsx index 8df873058..ed11e7c6b 100644 --- a/apps/frontend/src/blocks/CreateQuizZone/CreateQuizZoneBasic.tsx +++ b/apps/frontend/src/blocks/CreateQuizZone/CreateQuizZoneBasic.tsx @@ -80,10 +80,11 @@ const CreateQuizZoneBasic = ({ onChange={(e) => handleChangeQuizZoneBasic(e, 'QUIZ_ZONE_ID')} isBorder={true} className="rounded-md w-full" - placeholder="ν€΄μ¦ˆμ‘΄ μ½”λ“œλ₯Ό μž…λ ₯ν•˜μ„Έμš”" + placeholder="μˆ«μžμ™€ 영문자 5자 이상 10자 μ΄ν•˜" error={ validationError == '5자 이상 μž…λ ₯ν•΄μ£Όμ„Έμš”.' || - validationError == '10자 μ΄ν•˜λ‘œ μž…λ ₯ν•΄μ£Όμ„Έμš”.' + validationError == '10자 μ΄ν•˜λ‘œ μž…λ ₯ν•΄μ£Όμ„Έμš”.' || + validationError == 'μˆ«μžμ™€ μ•ŒνŒŒλ²³ μ‘°ν•©λ§Œ κ°€λŠ₯ν•©λ‹ˆλ‹€.' ? validationError : '' } @@ -95,12 +96,13 @@ const CreateQuizZoneBasic = ({ label="μ΅œλŒ€ 인원" name="quiz-zone-limit-player-count" step={10} - min={1} - max={300} value={limitPlayerCount} onChange={(e) => handleChangeQuizZoneBasic(e, 'LIMIT')} isBorder={true} className="w-20" + isShowCount={true} + min={1} + max={300} /> ( /> )} + {typeof value === 'number' && isShowCount && ( +
+ +
+ )} ); diff --git a/apps/frontend/src/utils/validators.ts b/apps/frontend/src/utils/validators.ts index 4ab4fbe18..a4fa943fa 100644 --- a/apps/frontend/src/utils/validators.ts +++ b/apps/frontend/src/utils/validators.ts @@ -39,10 +39,11 @@ export const validateQuizZoneSetDescription = (description: string) => { export const validateQuizZoneSetCode = (code: string) => { if (code.length < 5) return '5자 이상 μž…λ ₯ν•΄μ£Όμ„Έμš”.'; if (code.length > 10) return '10자 μ΄ν•˜λ‘œ μž…λ ₯ν•΄μ£Όμ„Έμš”.'; + if (!/^[a-zA-Z0-9]*$/g.test(code)) return 'μˆ«μžμ™€ μ•ŒνŒŒλ²³ μ‘°ν•©λ§Œ κ°€λŠ₯ν•©λ‹ˆλ‹€.'; }; //μž…μž₯ 인원 μ œν•œ μœ νš¨μ„± 검사 export const validateQuizZoneSetLimit = (limit: number) => { if (limit < 1) return 'μ΅œμ†Œ 1λͺ… 이상 μ§€μ •ν•΄μ£Όμ„Έμš”.'; - // if (limit > 300) return 'μ΅œλŒ€ 인원은 300λͺ…μž…λ‹ˆλ‹€.'; + if (limit > 300) return 'μ΅œλŒ€ 인원은 300λͺ…μž…λ‹ˆλ‹€.'; };