Conversation
wooodypark
reviewed
Jul 8, 2025
| /** | ||
| * 초기 유저의 책 등록 수에 따라 개구리 부여 | ||
| * @param {import('@frolog/frolog-api').GrantInitialStoreItemReq} reqDto 요청 DTO. | ||
| * @returns {Promise<import('@frolog/frolog-api').GrantInitialStoreItemRes>} 응답 DTO. |
Contributor
There was a problem hiding this comment.
이 api는 로그인한 유저가 요청하는 거니까 여기 param에 user도 있는게 좋을 것 같습니다.
그리고 밑에서 reqDto.id랑 user 인수의 id랑 비교하는 인가 체크도 있어야 할 것 같아요!
| export default async function grantInitialStoreItem(reqDto) { | ||
| const userId = decodeHashId(reqDto.id); | ||
| const count = reqDto.count; | ||
|
|
Contributor
There was a problem hiding this comment.
여기에서 위의 comment에서 말한 인가 체크와 count가 1 미만일때에 대한 validation 적용해놓으면 완벽할 것 같슴다
wooodypark
approved these changes
Jul 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
관련 이슈
내용
상세 내용