Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#48 기능 백엔드 기능입니다.
한번도 sequelize 라이브러리를 사용해 본적이 없어 기존 @zoomkoding 님의 코드를 보고 구글링을 하면서 최대한 따라해 보았습니다. 많이 부족한데, 더 좋은 방법이나 다른 접근 방법이 있으면 알려주세요!
추가사항
이제 검색했을 때
count
요소를 반환합니다.부가적인 기능이므로 따로 클라이언트 업데이트는 필요 없으며 클라이언트 정보를 추가해주는 방식으로 프론트 개발을 하면 될 것 같습니다.
앞으로의 추가사항
클라이언트에서 북마크를 추가할 때 업데이트된 수를 확인할 수 있도록
controllers/user.js
파일에 있는 add/remove 함수들도 수정할 예정입니다.