Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] 유저 정보 조회 API 구현 #288

Merged
merged 19 commits into from
Nov 27, 2024
Merged

[Feat] 유저 정보 조회 API 구현 #288

merged 19 commits into from
Nov 27, 2024

Conversation

simeunseo
Copy link
Collaborator

관련 이슈 번호

작업 내용

  • 자신의 프로필 정보 조회 API 구현
  • 다른 사람의 user Id로 프로필 정보 조회 API 구현
  • 티클 상세 조회 API 응답에 speakerId 필드 추가

PR 포인트

백엔드 팀원들의 도움을 받아서 구현했습니다.

고민과 학습내용

스크린샷

image image

@simeunseo simeunseo added FE Frontend 관련 작업 ✨ Feature 새로운 기능 추가 labels Nov 26, 2024
@simeunseo simeunseo added this to the 사용자 인증 시스템 milestone Nov 26, 2024
@simeunseo simeunseo self-assigned this Nov 26, 2024
Copy link

github-actions bot commented Nov 26, 2024

🎨 스토리북 확인하기

@@ -1,12 +1,22 @@
import { Controller, Get, Patch } from '@nestjs/common';
import { Controller, Get, Param, Patch, UseGuards } from '@nestjs/common';
Copy link
Collaborator

Choose a reason for hiding this comment

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

p3 안쓰는 import만 제거하고 머지하시면될거같습니다!

Copy link
Collaborator

@seoko97 seoko97 left a comment

Choose a reason for hiding this comment

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

이전 PR이 아직 병합되지 않아 같은 내용이 존재하는 것 같습니다!

이전 PR에 남긴 리뷰 먼저 확인해 주시면 감사하겠습니다!

#286

Comment on lines +84 to +89
const user = await this.userRepository
.createQueryBuilder('user')
.leftJoin('user.ticles', 'ticles')
.addSelect('ticles.title')
.where('user.id = :userId', { userId: userId })
.getOne();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Q:
TypeORMfind({relations})와 동일한 결과 값을 반환할 것 같은데 queryBuilder를 사용하신 이유가 있을까요?

Comment on lines +96 to +102
return {
id: user.id,
nickname: user.nickname,
profileImageUrl: user.profileImageUrl,
provider: user.provider,
ticles: ticles.map((ticle) => ticle.title),
};
Copy link
Collaborator

Choose a reason for hiding this comment

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

p5:
만약 QueryBuilder를 사용하는게 목적이라면 QueryBuilder를 통해 직접 조회하는 것도 좋을 것 같습니다! (학습 목적으로)

@simeunseo simeunseo merged commit c48f2c6 into develop Nov 27, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FE Frontend 관련 작업 ✨ Feature 새로운 기능 추가 size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat] 사용자 프로필 정보 조회 API 구현 [Feat] 자신의 프로필 정보 조회 API 구현
5 participants