Skip to content

Conversation

@fs6-kde
Copy link

@fs6-kde fs6-kde commented Jul 6, 2025

요구사항

기본

  • pm2, nginx는 못하였습니다.
  • jest도 프론트, 백 둘다 못하였습니다.
  • 프론트 배포 못하였습니다.

심화

  • 상품 이미지 업로드
    AWS S3의 Presigned URL 기능을 활용하여 상품 이미지 업로드 기능을 구현합니다.

스크린샷

  • aws 콘솔 홈 결과물
    스크린샷 2025-07-06 233134
    스크린샷 2025-07-06 233144
    스크린샷 2025-07-06 233223
    스크린샷 2025-07-06 233231
    스크린샷 2025-07-06 233300
    스크린샷 2025-07-06 233339

  • DBeaver에서 상품 객체 데이터 예시 (RDS 연결)
    image

멘토에게

  • 제가 미션12하기 전에 기능 수정을 몇가지 하여 파일양이 많아보일 수 있습니다...!
  • 셀프 코드 리뷰를 통해 질문 이어가겠습니다.

return token || undefined;
},
});

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HS256HMAC + SHA256으로 암호학 전문적으로 공부하시게 되면 다룰 내용이에요.

}

function removeUndefined<T extends Record<string, any>>(obj: T): Partial<T> {
return Object.fromEntries(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Record는 프론트에서 라우트 쿼리 매핑할때 많이 써요! Generic 잘 적용하셨습니다:)

super(message, 404, data); // 404은 기본값
this.name = "NotFoundError";
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http 상태 코드 조금 더 세분화해주세요.

Status 이름 의미 예시
400 Bad Request 문법 오류, 누락된 파라미터 JSON 파싱 오류 등
401 Unauthorized 인증되지 않은 사용자 로그인 실패, 토큰 없음
403 Forbidden 인증은 되었지만 권한 없음 관리자 전용 기능 접근 등
404 Not Found 요청 리소스 없음 잘못된 URL, ID 없음
405 Method Not Allowed 메서드 불허 GET만 가능한 엔드포인트에 POST 요청
422 Unprocessable Entity 문법은 맞지만 처리 불가 빈 body, 유효성 검사 실패 등
500 Internal Server Error 서버 내부 오류 DB 연결 실패 등

// 로그인 - 비번 일치 에러 함수
async function verifyPassword(
inputPassword: NonNullable<User["password"]>,
password: NonNullable<User["password"]>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

내장 타입 잘 쓰셨습니다!

@loquemedalagana
Copy link
Contributor

conflict 해결해주세요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants