Skip to content

feat: postWellItem에 누적 책 2권 이상 등록 시 개구리 아이템 지급하는 로직 추가#47

Merged
lilloo04 merged 2 commits intodevfrom
feat/#46
Jul 25, 2025
Merged

feat: postWellItem에 누적 책 2권 이상 등록 시 개구리 아이템 지급하는 로직 추가#47
lilloo04 merged 2 commits intodevfrom
feat/#46

Conversation

@lilloo04
Copy link
Copy Markdown
Member

연관 이슈

내용

  • 초기에 유저가 책을 2권 등록하면 개구리 아이템을 지급하는 로직 추가
  • postWellItem(책 등록 API)에서:
    • 유저가 책을 등록할 때마다 해당 유저가 읽은 책 수를 조회
    • 2권 이상이면 grantInitialStoreItem 호출하여 개구리 지급

@lilloo04 lilloo04 requested a review from wooodypark July 22, 2025 10:53
@lilloo04 lilloo04 self-assigned this Jul 22, 2025
Comment thread src/services/postWellItem.js Outdated
import { Well, WellItem } from '@frolog/models';
const getUserWellItemCount = new GetUserWellItemCount({
accessToken: SSC_TOKEN,
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

import getUserWellItemCount from './getUserWellItemCount.js';
이런식으로 임포트만 해서 사용가능할 것 같습니다


// (6) 책 2권 이상이면 초기 개구리 지급
if (total >= 2) {
await grantInitialStoreItem
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

await grantInitialStoreItem(user.id, total)
이런식으로 그냥 함수 쓰듯이 사용하면 될 것 같아요

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

감사합니다!!~

@lilloo04 lilloo04 merged commit 60f0811 into dev Jul 25, 2025
1 check passed
@lilloo04 lilloo04 deleted the feat/#46 branch July 30, 2025 04:26
@lilloo04 lilloo04 mentioned this pull request Aug 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants