[오하영] Sprint 11#49
Merged
reach0908 merged 8 commits intocodeit-sprint-fullstack:express-오하영from Jun 18, 2025
Hidden character warning
The head ref may contain hidden characters: "express-\uc624\ud558\uc601"
Merged
Conversation
reach0908
reviewed
Jun 18, 2025
|
|
||
| async function save(data, ownerId) { | ||
| async function save( | ||
| data: Pick<Product, "images" | "tags" | "price" | "description" | "name">, |
There was a problem hiding this comment.
[P1]
이렇게 Pick할 필드가 많아지고 해당 타입이 중복되어 사용된다면 위에 ProductDataType과 같이 별도로 선언을 하는 방식으로 하면 재사용성이 좋아집니다.
Comment on lines
+20
to
+23
| verifyAccessToken, | ||
| articleValidator, | ||
| validator, | ||
| createArticle |
There was a problem hiding this comment.
[P0]
미들웨어는 미들웨어, 컨트롤러는 컨트롤러 라고 명시적으로 네이밍을 하면 훨씬 가독성이 좋아질 것 같습니다.
Collaborator
Author
There was a problem hiding this comment.
verifyAccessTokenMiddleware,
articleValidatorMiddleware,
createArticleController
이런식으로 파일명 뿐만 아니라 함수 이름에도 역할을 명시하란 말씀이신가요?
Comment on lines
14
to
16
| const path = `${req.protocol}://${req.get("host")}/image/${ | ||
| req.file.filename | ||
| req.file?.filename | ||
| }`; |
There was a problem hiding this comment.
[P0]
이렇게 하면 path에 undefined 가 들어갈 것 같습니다. file name이 없는 경우에는 다른 예외처리를 해야하지않을까요?
Comment on lines
+1
to
+27
| export const ExceptionMessage = { | ||
| // Not Found | ||
| PRODUCT_NOT_FOUND: "상품을 찾을 수 없습니다.", | ||
| ARTICLE_NOT_FOUND: "게시글을 찾을 수 없습니다.", | ||
| COMMENT_NOT_FOUND: "댓글을 찾을 수 없습니다.", | ||
| USER_NOT_FOUND: "사용자를 찾을 수 없습니다.", | ||
| ACCESSTOKEN_NOT_FOUND: "accessToken을 찾을 수 없습니다.", | ||
| REFRESHTOKEN_NOT_FOUND: "refreshToken을 찾을 수 없습니다.", | ||
|
|
||
| // Not Match | ||
| PASSWORD_NOT_MATCH: "비밀번호가 일치하지 않습니다.", | ||
| PASSWORD_CONFIRMATION_NOT_MATCH: "비밀번호 확인이 일치하지 않습니다.", | ||
|
|
||
| // Already Exist | ||
| ALREADY_EXIST_EMAIL: "이미 사용중인 이메일입니다.", | ||
| ALREADY_EXIST_NICKNAME: "이미 사용중인 닉네임입니다.", | ||
|
|
||
| // Invalid | ||
| INVALID_EMAIL: "잘못된 이메일입니다.", | ||
| INVALID_INPUT: "필수 정보를 모두 입력해주세요.", | ||
| INVALID_ACCESS_TOKEN: "유효하지 않은 accessToken 입니다.", | ||
| INVALID_REFRESH_TOKEN: "유효하지 않은 refresh Token 입니다.", | ||
|
|
||
| UNAUTHORIZED: "인증되지 않은 사용자입니다.", | ||
| FORBIDDEN: "요청한 작업을 수행하기 위한 권한이 없습니다.", | ||
| GOOGLE_LOGIN_FAILED: "구글 로그인에 실패하였습니다.", | ||
| }; |
508d069
into
codeit-sprint-fullstack:express-오하영
1 check passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요구사항
기본
공통
any타입의 사용은 최소화해 주세요.백엔드
tsconfig.json파일을 생성하고, 필요한 컴파일러 옵션을 설정해야 합니다. (예:outDir).package.json에 설정해 주세요. (예: 빌드 및 개발 서버 실행 명령어).ts-node와nodemon을 사용하여 개발 환경을 구성합니다.nodemon과 함께ts-node를 사용하여. ts파일이 변경될 때 서버를 자동으로 재시작하도록 설정합니다.declare를 사용하여 타입을 오버라이드하거나 확장합니다.주요 변경사항
스크린샷
멘토에게