codestates / codestates/Roadgram

[Dev-Log] 2022/02/16 한주형

Open
#73 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
5
Forks
5
PR merge metrics
No merged PRs in 30d

Description

> ### 오늘은 어떻게 프로젝트에 기여했나요?
> * 무한스크롤 기능 구현
> * 최신순 게시물 조회 / 마이페이지 조회 / 태그 검색 기능 구현
> ### 오늘의 프로젝트에서 힘든 점은 무엇인가요?
> * 여러 번의 left join을 거쳐서 값을 가져올 때 주어진 API로는 잘 구현이 되지 않았다. (사용법이 미숙하여 where절에 다 포함하여 구현했다.)
> * tag들을 가져올 때 article과 같은 depth로 가져오고 싶은데 구현이 잘 되지 않았다.
> ```js
> async searchArticle(tag: string): Promise {
> const articles = await this.createQueryBuilder("article")
> .leftJoinAndSelect("article.tags", "tags")
> .leftJoinAndSelect("tags.tag", "tag")
> .where("article.id IN (Select article_id from article_tag left join tag on article_tag.tag_id = tag.id where tag_name = :tag)", {tag})
> .orderBy("article.created_at")
> .printSql()
> .getMany();
> console.log("articles", articles);
> return articles;
> ```
> ### 내일은 프로젝트에 기여하기 위해 무엇을 해야 하나요?
> * [ ] API 문서 양식에 맞게 응답코드 구현하기(컬럼명, 응답메세지, 코드 등)
> * [ ] 인증 부분을 API에 추가한 후 기능 테스트

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.