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

[BE] 즐겨찾기, 마이페이지 API 수정 #201

Merged
merged 6 commits into from
Nov 26, 2024
Merged

Conversation

sieunie
Copy link
Collaborator

@sieunie sieunie commented Nov 26, 2024

✅ 주요 작업

  • 즐겨찾기 여부 조회 API를 detail 페이지 상단부 조회 API와 통합 (조회할 때 로그인 안되어있으면 기본값 false)
  • 마이페이지 API 보유량이 0인 종목은 조회하지 않도록 수정
  • 마이페이지 수익률 소수점 2자리로 고정
  • queryRunner 사용 부분에 트랜잭션 추가 (이전 작업 반영되어야 하는 커밋이라서 어쩔 수 없이 여기 이어서 올렸습니다ㅠㅠ)

@sieunie sieunie added BE 백엔드 API API 구현 labels Nov 26, 2024
@sieunie sieunie self-assigned this Nov 26, 2024
@sieunie sieunie requested review from uuuo3o and jinddings November 26, 2024 08:32
@sieunie sieunie merged commit a1cd1bb into back/main Nov 26, 2024
2 checks passed
Copy link
Collaborator

@uuuo3o uuuo3o left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!!

@@ -106,7 +107,7 @@ export class AssetService {
private async updateMyAsset(asset: Asset, currPrices) {
const userId = asset.user_id;
const userStocks = await this.userStockRepository.find({
where: { user_id: userId },
where: { user_id: userId, quantity: MoreThan(0) },
Copy link
Collaborator

Choose a reason for hiding this comment

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

🟢 여기 근데 보유량이 0인 경우는 뭔가요??
예를 들어 삼성전자 20주 구매했는데 20주 전부 매도하면 보유량이 0이 되는건가요?
만약에 그런거라면, 하루에 한번씩 장 마감 됐을 때 저런 거 delete 하는 로직도 추가되면 좋을 거 같아요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

맞습니당! 그 로직도 추가하면 좋을 것 같네요ㅎㅎ

@sieunie sieunie deleted the fix/api/bookmark branch December 5, 2024 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API API 구현 BE 백엔드
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants