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 추가 #33

Merged
merged 5 commits into from
Jul 11, 2024

Conversation

JonghunAn
Copy link
Member

PR 내용

  • 피드 전체조회 및 즐겨찾기 피드 조회 API 추가

추가 및 변경 사항

API endpoint와 추가 혹은 변경된 사항을 적어주세요!

  • [GET] post/

PR 중점사항

리뷰어가 중점적으로 봐야하는 부분에 대해 적어주세요!

스크린샷

@github-actions github-actions bot added document 문서화 관련 작업 수정 및 생성 feature labels Jul 2, 2024
@JonghunAn JonghunAn self-assigned this Jul 3, 2024
@JonghunAn JonghunAn changed the title feat: 내 피드 전체조회 및 즐겨찾기 피드 조회 feat: 내 피드 전체조회 / 즐겨찾기 피드 조회 Jul 3, 2024
@JonghunAn JonghunAn changed the title feat: 내 피드 전체조회 / 즐겨찾기 피드 조회 feat: 내 피드 전체조회 / 즐겨찾기 피드 조회 API 추가 Jul 3, 2024
this.userId = post.userId.toString();
this.url = post.url;
this.title = post.title;
this.description = post.title;
Copy link
Collaborator

Choose a reason for hiding this comment

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

description 잘못들어갔당

Copy link
Member Author

Choose a reason for hiding this comment

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

오옹 떙큐!_

Copy link
Member Author

Choose a reason for hiding this comment

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

반영완료!

async getPost(
@GetUser('id') userId: string,
@Query() pagingQuery: PaginationQuery,
@Query('isFavorite') is_favorite?: boolean,
Copy link
Collaborator

Choose a reason for hiding this comment

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

카멜루 ..

Copy link
Member Author

Choose a reason for hiding this comment

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

반영완료!

Comment on lines +23 to +25
if (isFavorite !== null) {
query = query.where({ isFavorite: isFavorite });
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

(/¯◡‿◡)/¯✧·˚ : *✧·˚ : *
isFavorite 이 undefined일 일은 없나?? 궁금쓰

Copy link
Member Author

Choose a reason for hiding this comment

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

응응 default값을 false로 해뒀어!

Comment on lines +26 to +27
const post_list = await query.lean().exec();
return post_list;
Copy link
Collaborator

Choose a reason for hiding this comment

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

image

import { GetPostDto } from '@src/modules/posts/dto/getPostDto';

export class PostListResponse {
@ApiProperty({ type: Number, description: '피드 총 개수' })
Copy link
Collaborator

Choose a reason for hiding this comment

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

타입에 number말고 Number 쓴이유 궁금쓰

Copy link
Member Author

@JonghunAn JonghunAn Jul 8, 2024

Choose a reason for hiding this comment

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

property type줄 때는 Number 타입으로 줘야하더라고~
https://docs.nestjs.com/openapi/types-and-parameters

Copy link
Collaborator

Choose a reason for hiding this comment

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

오호 👍

Copy link
Collaborator

@hye-on hye-on left a comment

Choose a reason for hiding this comment

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

고생했어!! 👍

this.description = post.title;
this.isFavorite = post.isFavorite;
this.createdAt = post.createdAt;
this.updatedAt = post.updatedAt;
Copy link
Collaborator

Choose a reason for hiding this comment

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

〆(・∀・@)
updatedAt
이거 줘야되나용?

Copy link
Member Author

Choose a reason for hiding this comment

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

아 나중에 ai 요약 생기면 description이 추가되면서 업데이트가 될꺼라 updateAt도 같이 내려줬어!

@JonghunAn JonghunAn merged commit bd58c2b into development Jul 11, 2024
1 check passed
@J-Hoplin J-Hoplin deleted the feature/get-post branch July 15, 2024 13:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
document 문서화 관련 작업 수정 및 생성 feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants