-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
src/modules/posts/dto/getPostDto.ts
Outdated
this.userId = post.userId.toString(); | ||
this.url = post.url; | ||
this.title = post.title; | ||
this.description = post.title; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
description 잘못들어갔당
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오옹 떙큐!_
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
카멜루 ..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반영완료!
if (isFavorite !== null) { | ||
query = query.where({ isFavorite: isFavorite }); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(/¯◡‿◡)/¯✧·˚ : *✧·˚ : *
isFavorite 이 undefined일 일은 없나?? 궁금쓰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
응응 default값을 false로 해뒀어!
const post_list = await query.lean().exec(); | ||
return post_list; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { GetPostDto } from '@src/modules/posts/dto/getPostDto'; | ||
|
||
export class PostListResponse { | ||
@ApiProperty({ type: Number, description: '피드 총 개수' }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
타입에 number말고 Number 쓴이유 궁금쓰
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
오호 👍
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
〆(・∀・@)
updatedAt
이거 줘야되나용?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아 나중에 ai 요약 생기면 description이 추가되면서 업데이트가 될꺼라 updateAt도 같이 내려줬어!
PR 내용
추가 및 변경 사항
PR 중점사항
스크린샷